Gate Demo in WebAssembly

Rust added a new compiler target a couple of months ago: wasm32-unknown-unknown. This allows Rust code to be compiled to WebAssembly and run in a web browser. Since I had recently completed my Gate Demo game, I thought it would be neat if I could use this target to play the game in a browser. It took some refactoring of Gate, but I got it working, and you can play it here. Despite needing to update the Gate library, I didn't need to update the core game logic at all.

As an aside, I tweeted this yesterday, and currently have 152 likes and 49 retweets! This breaks my previous tweet record of 2 likes and 6 retweets.

Tags: coding, gamedev