Snake

A massive multiplayer implementation of Snake using websockets.

snake-cover.png

OpenFrameworks & Websockets on Node.js

The game itself is developed in OpenFrameworks. A Node.js based server manages player connections and controls. We use socket.io and ws for communication.

A simple intuitive control system ensures that players can keep their eyes on the game, not their phones. Finger movements are sent as swipes - a single motion across the screen can be comprised of multiple swipes. We built a swipe detection library in Javascript for this game.

Low latency

To minimise latency, player control messages are encoded in binary to reduce packet sizes for transmission.

Massively Multiplayer Fun

The number of players is limited by the supported number of concurrent connections on the router, and/or the size of the game canvas.

 
snake-join.png

Just add WiFi

For an even better on-boarding experience, we use a captive portal (like the ones you see when logging on to WiFi hotspots at cafés and airpots) to serve the game. All that a user needs to do is connect to a specific wifi network, which is also specified on the game screen. There's no website to visit or app to download.

Loads of Fun. Always.

We've had the game set up at a few different events and locations now, and it always attracts a crowd.

snake-exhibit1.jpg
snake-exhibit2.jpg
snake-exhibit3.jpg

Fun Competitive Elements

Players can intentionally block others to stymie their progress. A leaderboard displays high scores throughout the session, and snakes playfully fall apart as square blocks when killed.

Easy to get started

The control interface on the phone is also the same colour as the player colour in the game, to help the user situate themselves in the game.

Fast & Fluid

A queue system adds additional players to a waitlist, and they are automatically joined as other players quit. In a public setting, this keeps the action fluid and fast-paced.

 
snake-screens.png