Paku Waka

This post first appeared 11 February 2024.

They say that imitation is the sincerest form of flattery.

This was my first foray into small game development. I decided to make some things easier, and add restrictions to other things. These were the rules when I started.

I wanted it to work both on my desktop and in a browser and to be close to the metal, so I picked rust to write the game in with a small shim in JavaScript to load the WASM module and run it. The front-end is minifb on desktops and a HTML <canvas/> object in the browser.

The web setup doesn’t use a bundler or any additional files other than the JS on this page and 15kb of compiled WASM.1 The game library itself comes in at just shy of 500LoC, about half of which are concerned with rendering. Its not good code, because it was written on a time-budget2, but its done and that is good enough.


  1. This is a really good resource for anyone wanting to do tiny WASM in rust. ↩︎

  2. One of the reasons I’m not publishing the source. ↩︎