So it transpires that my friends are of the ultra-competitive sort (who knew?), and thus was borne a fanatical addiction to the board game Monopoly. Unfortunately, as anyone who has ever played Monopoly knows, it is characterised by two widely acknowledged truths:
- It destroys relationships
- It takes approximately 322 times too long than it should to play
Fortunately, online multiplayer Monopoly was invented, thus resolving #2. Well, kinda. Online variants (the best being Pogo.com) do play a lot quicker — but then you lose some of that time again sitting through adverts. And if you don’t play, you don’t get to customise basically anything, meaning you’re stuck with their own house rules. Hence was born the idea for us (me and Austin Wellbelove) to “roll our own”. Before any lawyers pick up the phone, this was strictly an academic exercise and I doubt we’ll ever actually finish it. But it was fun trying. Here’s our stack:
- A Node.js installation (I’m approximately 5 years too late to that party, but better late than never)
- Concurrently running a cutting-edge websockets server (using socket.io) and a basic HTTP server
The basic design principle is low-latency, so we have all the clients storing their own state information. Websockets are then used to ping incremental moves around (client to server, server rebroadcasts), keeping the whole game moving really fast. And I have to say, it works. One regret is that we didn’t try to incorporate <canvas>, instead going with a pure HTML+CSS3 design (though that was also fun in its own way).