Rust Minesweeper WebAssembly
To learn the Rust programming language, I recreated the classic video game Minesweeper in it. Before diving into the technical details, you can play minesweeper below.
Play in fullscreen
I started out by recreating the game in the command line where you couldn’t click tiles, but instead had to manually type in the coordinates that you wanted to flag or reveal.
Entering commands to play minesweeper was cumbersome, so after finishing Command Line Minesweeper I started working on a GUI version. I settled on using Macroquad to handle the graphics and input. After a bit of finagling, I was able to adapt my CLI code to work for with a GUI version. I’m no artist, so both the English and Japanese tile sprites were made by a friend of mine.
I’ve been enjoying using Rust, and though at times it can be cumbersome I look forward to using it more in the future.