.df

Pandemic Board Game Clone

Get the source and boot up your pandemic server here: Terrademic

In the early days of the Covid-19 pandemic, when many of us in the US of A were blithely posting memes and we had not gotten quite so familiar with our interiors, I sat at my desk, furiously tapping my phone, checking, to see if any of my favorite podcasts had done a deep dive of the topic while my girlfriend chatted with her college roomates over Zoom. They were deciding what game to play next, the energy for Dungeons and Dragons waning. My girlfriend suggested Pandemic, a cooperative board game where your and your partners, each with a different set of special abilities, traipse around the globe, treating and doing research on 4(!) separate outbreaks.

This wasn’t just banter, the Padnemic board game is really good. The version my girlfriend and I own, Pandemic Legacy plays more like a table-top RPG, with a story arc that reveals itself through multiple playing sessions, and a leveling system for both you and the diseases. After a brief search, there didn’t seem to be a straightforward way for friends to play pandemic over the internet. The official video game sadly doesn’t match the quality of its inspiration with game breaking bugs and a total lack of multiplayer over the internet.

I chimed in at the nadir of their disappointment, saying I wouldn’t mind hacking together a pandemic clone. I said those eternally foolish words, “how hard could it be?”. Thinking that I have the entire business logic, or rule set in my head, and what I can’t remember I can easily refrence. Roughly two weeks and a mountain of hacky svg click handling, networking code, and close inspection of the vanilla ruleset, netted me the working implementation.

Javascript is not my lingua franca and this was my first foray into both socket.io and dynamic SVG creation so the code is, frankly, awful. But hey, its playable, and I think its a good reference for some of the footguns one might run into when implementing a non-trivial boardgame to javascript. Plus, the insight gleaned from this implementation informed many design decisions when making the Sudoku With Friends app so I count it as a win.