Paku Waka
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.
- Paku paku is a lot of fun. I am
copyingrecreating it, and the game should have no more scope than that. - The game should be written in five one-hour sprints.
- For the first four hours, I am only allowed to compile the code during the last ten minutes. The rest of the time I must rely on LSPs.
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.