In my previous post I talked about how to make an IRC bot in Node.js that would store messages in a CouchDB instance. This time, I’ll look at how we might retrieve and display the stored messages.
Over at JS Oxford we’ve been avidly using IRC for organising, as well as general JS chatting. The openness of IRC is brilliant. You can just rock up to freenode,
/join #jsoxford, and you’re chatting with the team. One of the major downsides I found with IRC though is that there is no obvious way to view conversations that happened while you were offline. So I decided to write a small bot that would save the conversation in a public document store. From that point on, it’s just a small jump to displaying chat data on a public webpage (and another blog post ;).
Man, I love the Wedonverse. All of it. Firefly, Dollhouse, Buffy… even Angel. I really like Firefly. So much so that I’ve made my (lovely) girlfriend watch Castle, just because it has Nathan Fillion in it. So I got to thinking, how much crossover is there with all these shows? What we need is some kind of node/edge graph :)
Last year’s jQuery conf was sponsored by BlackBerry and they gave away playbooks, loads of ‘em. This gave us an idea. Why not a game that ran across many of them? So we made a game that you can host and have multiple players join with their own device. You can also attach multiple screen together using hot areas so you can play across browsers across multiple computers. We called this game Twon… cause it’s kinda like Tron… kinda.
Naturally, the tech of choice was Node.js based sockets using Express. This allows some easy subscriptions to events across multiple devices.
Setting up the game is real easy. You can download the source at https://github.com/skinofstars/Twon, run npm install and then fire node app.js at it and you’ve got the Twon server up and running. Then, just visit the host machine with a few other browsers. You’ll see in the /public folder of the repo which pages to visit depending on what you’d like the browser to act as. We find projectors are great as arenas and mobiles as controllers.