Create your own Dark Room text adventure

A Dark Room is a simple text based adventure game written in HTML 5 that is currently taking the world, or at least Reddit, by storm. I like the idea of the game, its not fancy looking and uses technologies that work in the browser, so pretty much anybody can play it. It also means that people who fancy hacking around with it can no problem and in fact the author has packaged it given it a license to help people do just that.

The game is code is available an licensed under a Mozilla Open License, the code itself runs it can be found in this Github repository. This means its very easy to take the game and host it on your own website or change it to make your own custom version of the game if you are willing to spend the time to look through.

First you need to head over to the games Github page. Github is a social a place for developers to share code using a system called Git and adds social functionality. Once you are over at the website you can download it buy pressing the download as zip button (or if you use Github, you can clone the project). One downloaded and unzipped you should be able to play it by simply navigating to index.html and opening the file in a web browser. Since all the code is in Javascript/HTML 5 it should just work locally without the need if a web server, but you can upload the code to your own server for the whole world to play it.

The chances are however that you want to do more than host the original game, you’ll want to change it to use your own vocabulary or modify the gameplay. To do this you want to edit the scripts in the /scripts folder using a text editor of your choice. Personally I like to use the IDE Eclipse with Javascript extensions, but some people find that overkill for Javascript editing.

It looks like that up to now the game has been written by one guy, there are lots of humorous comments in the code and sometimes I found it hard to work out what went where. Once I’ve gotten a better grip on things I might do a more in depth look at editing the game. It doesn’t look to hard though and can’t wait to see what people come up with.