You might remember Twitch Plays Pokémon, which was a game of Pokémon Red played by an entire chat room of people.
A wonderful friend of mine is getting married soon, and for her hen do I thought it would be fun to set up the same thing for us.
There's a really great project on GitHub called TwitchPlaysX, which lets you do exactly this. The instructions in the readme are fairly self-explanatory for putting it together in Ubuntu, so what I did for the hen do was to set it up using debootstrap. It occurred to me afterwards, however, that it would have been fairly straightforward to put it together in Debian, so what follows are instructions for doing that.
The easiest way to get node.js installed is to install it from source. Do:
wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz tar -xvf node-v0.12.7.tar.gz cd node-v0.12.7 ./configure make sudo make install
Next, you copy over the code, and install all of the dependencies.
git clone https://github.com/hzoo/TwitchPlaysX.git cd TwitchPlaysX npm install sudo apt-get install xdotool
Finally, you need to make a configuration file.
vim config.json
The one below lets you use a normal IRC server instead of a Twitch chat. This means that you can have everyone at a party install an IRC client on their phone, connect to a channel, and start playing. Android users can use AndroIRC, and iPhone users can use Colloquy. You need to pick a name for your channel; in the instructions below, we will call it "this_channel", and we'll be using the Freenode IRC server.
To connect to the channel in AndroIRC, press the "+" symbol, select freenode, choose a nickname, and then type "/join this_channel". In most other IRC clients, type "/server irc.freenode.net", then "/nick your-nickname", then "/join this_channel".
Save the following text in the config.json file:
{ "TWITCH_IP": "irc.freenode.net", "TWITCH_USERNAME": "God", "TWITCH_CHANNEL": "#this_channel", "CONFIG_OS": "other", "CONFIG_PROGRAM_NAME": "ZSNES", "CONFIG_MAX_CHAR_NAME": 20, "CONFIG_MAX_CHAR_COMMAND": 20, "CONFIG_SEND_KEY": true }
I have CONFIG_PROGRAM_NAME set to ZSNES, because I was playing Legend of Zelda in my channel. If you want to play a Gameboy game, use "VisualBoyAdvance" instead. The commands that get sent are "a", "b", "x", "y", "s", and "e". To set ZSNES to use these, open it up, go to CONFIG, then INPUT, then press SET KEYS and press the appropriate keys when prompted, using "s" for "start" and "e" for "select".
To get it running, make sure that you have ZSNES open, and then do:
npm start
Connect to your IRC channel and start typing commands: they should show up in the console, and your game should start to play. This was a seriously fun way to spend an evening, especially if you have friends who write IRC bots off the cuff for fun. Other bits of revelry from the evening included a rousing game of "Pin the Gonad on the Nematode Worm", and a custom version of Cards Against Humanity.
For Community fans, I think a really good game to play this with would be Journey to the Centre of Hawkthorne.