Proof By Example

Programming blog by Mark Feeney

Multiplayer game architecture demo in TypeScript 2.0

Recently, I’ve been interested in various aspects of game development. One area of particular interest is how multiplayer games engines generally work (and deal with state). I came across an excellent series of articles on the architecture of client-server games by Gabriel Gambetta. Read these! At the end of the articles he presents a neat live demo to make concrete the ideas discussed.

I decided to make a clone of Gabriel’s demo so I could better understand how it worked. Once I got into it, I also added entity interpolation, which is talked about in the articles, but not implemented in the original demo.

Try out my version of the demo if you’re interested. The code is here.

It’s written in TypeScript 2.0 for mental health reasons.