Tag Archives: coding

The Horror, The Horror: Building a search engine Prop for a LARP

So I was involved in Room 13’s Collector Con earlier in the year and one of the things we wanted to do as a prop was to give the players the ability to search online for clues, so what we needed was a search engine that was big enough for them to explore, but would quietly present them with fake results hidden away amongst real ones to enhance the immersion.

Being the tech-ref for the game this fun fun job fell to me to do a quick feasibility study to work out if we could do it for the game.

Now the last thing we wanted to do was have to write a search engine from scratch, and then populate it with enough fake data to hide the clues amidst false leads – that just wasn’t going to be economical in terms of how much Ref time was going to be needed to put it together.  So instead what I did was build a rewriting proxy server.  It works something like this:

A diagram of boxes showing the flow between a web-browser on the left via an apache proxy, to the DDG search engine, back through rewrite HTML, then ddg-rewriter, before returning to the web-brower

So basically a Web Browser makes a request of our server (search.example.com).  The Apache webserver makes a proxy request to http://duckduckgo.com/html (who see’s it as coming from search.example.com and not the web-browser).

Of the data that comes back, if its an HTML page then Apache rewrites http://duckduckgo.com/html to http://search.example.com/html

Every page and image is then sent to a small program called “ddg-rewriter” which scans for HTML files.  It has a list of “Keyword” -> “Fake result” associations and if it sees one of these keywords used it will insert the relevant fake result(s), if not it will leave the page unchanged.

The end result is that DDG thinks its getting search requests from search.example.com.  And the players Web Browser gets back a page that appears to be from http://search.example.com – so it has all the usual search output you would see online, but if specific keywords are used then the fake results are inserted.

Those fake results will appear to blend in better because they have a URL that is shown (so http://magicaldomain.com) however they are actually linked to somewhere else (so http://game.example.com/magicaldomain).  This means you can make it look like your search results appear from dozens of domains without having to buy a single one, as they can all be really hosted from your example.com server.

So yeah, there we go, feel free to download the code and configs and have a browse, yes its messy, yes its first drafty, yes it should be pulling in data from a database and have a nice management interface (and yes it was written by my foul mouthed alterego as usual) however it is functional and should give you some ideas for how to do this kind of thing.  There’s a README.txt in there which will include some more technical details.

If you want it: ddg-rewriter_2018-05-25.zip (11k)

Secure Facility 7: TeH h4x0rs

Okay so the final thing that I built most specifically for SF7 was the interface for funky movie style hacking that occurred in the game, this was basically … a sort of a bodge in a way, it was one of those things that I knew wasn’t going to have to stand up to a lot of traffic, but was going to have to look the part in terms of being a sharp contrast to the corporate smoothness of the rest of the site, and also was going to have to give the players some sort of delay and some sort of challenge to make them work for their information. Continue reading

Secure Facility 7: Door Control

The Door Access Code system was designed so that players could enter the codes from 2 department heads, inside an hour, which would then “unlock” the doors in character, and allow them to throw the dead mans handle, spin the wheels, and press the two additional deadmans handles by the door to open the main bunker doors – killing everyone inside pretty fast from radiation poisoning.  While this sounds like a bad idea once they worked out they were sharing the facility with an unknown alien being some of them get very tempted to use it :) Continue reading

Secure Facility 7: The Intranet CMS

Now unlike the ECR system I built for NFQ which was a more old style menu system complete with random corruptions and purposeful slow down this was supposed to be a more up to date web based system, we wanted multiple people to be able to use it and for information to be able to be added by the Refs in the run up to the event, so what we wanted was a pretty regular CMS, it was for a small fictional organisation of like 200 people and it needed to be able to support multiple accounts, various storage of text locked to groups and accounts, and also displaying video and calendaring. (TODO: I’ll hopefully post a few screenshots of the final thing and edit them into this post later) Continue reading

Secure Facility 7: The Intranet Prop Main Post

Okay so Room13 had me (often via the medium of my infamously sweary alterego that I created for British Haunts who’s lived on) onboard for another event, in this case Secure Facility Seven and unlike previous events I wasn’t Reffing this one, just being a crew runner on the day and making a single big prop (or kinda facilitating it) of a computer system for the players to interact with as an intranet for the underground bunker they found themselves in.  I’ve broken up my writing about this into several shorter more manageable posts:

  1. The Intranet CMS: Underlying everything was the base intranet site that gave them useful information
  2. Central Control Room: The control room had a panel counting down to the end of the game and displaying various bits of information (who was trying to open the door for one)
  3. Door Control: A small handful of pages that integrated with the CMS and control room to grant access to the doors in-character by needing two correct codes entered within a time frame.
  4. The Hacking System: Which allowed a character with the right skill to break into accounts and get their passwords, simulated here by some technobabble and sudoku :)  It was designed to be an alternative method to guessing passwords from clues in the environment and also to spur on roleplaying by use of looking kinda stereotypical.
  5. What Did We Learn: A short post about 5 useful things I think I learnt from helping make this system and seeing how the players interacted with it on the day.

For anyone who’s interested the relevant bits of little twiddly code is up here, some of it is extremely rough (I’m not even kidding, a lot of this is first draft good enough on the day kind of code) but built with a purpose:  secure-facility-7-code.tar.bz2

Also I can’t recommend hosting your own stuff enough if you’ve the skills, the ability to have raw access to files and databases,as well as do tricks like bulk email redirects for setting up accounts for NPCs is invaluable.

Feed back and questions are as ever welcome :)

NFQ – The ECR (Emergency Control Room) Computer Prop

Those of you who were in the ECR at all during the NFQ/Incident ### game may have noticed a black laptop on the west facing wall (that nearest to the directors office) which had some nice green text on a black backdrop that updated itself pretty infuriating slowly :)  That was one of mine, and something I really had some fun putting together, although it was all a bit bodgey internally.  So this is going to be a walk through a download of that anyone thinking of putting together something similar can see some of the weird tricks I used, I’ll also be talking about lessons learnt from the event and things I’d change next time.

Continue reading

Oracle buyout of Sun may be good for OpenOffice

Well as some of you may have heard Oracle bought Sun Microsystems. Now apparently Oracle will be “examining” OpenOffice, to which Sun is the biggest contributor.

Now that’s all the background out of the way here’s why I think this may be good for OpenOffice. The rumours I hear is that Sun keep the codebase of OO.org horrifically complex and do their best to keep it locked up and controlled from outside contributors, now if Oracle loosen the controls (or just drop it) it opens the place up for someone else with cash (IBM?) to swoop in, reengineer the horrific bits and make it easier for outside contributors to actually do some work.

Best car comparison evar

So Steve Yegge’s blog is a constant (well monthly) source of awesome right? He recently included in a post about Ejac (JavaScript for Emacs) a continuation of the famous “Cars == Programming Languages” comparison.

So to continue (for techies mostly) if your (least) favourite language was a car/vehicle/mecha (yes Ruby I’m looking at you) which would it be?

In related news I hacked on cheezburger.el the other night, and my patches got accepted :)