Show HN: Blob Goes 3D – A 3D game for the Gameboy Advance in Rust

github.com

3 points by milanfin 7 days ago

Been wanting to learn Rust for a while and wrote a GBA game as a learning exercise. Also got to familiarize myself with 3d rendering as a bonus. Previously I've written a raycast game, but this is my first one in "real" 3d.

A lot of the hardware abstractions are done by the agb rust library. The video memory intractions were rewritten as that turned out to be way faster. Since there is no OS on the gba, this was a no_std project, with only core rust features available.

On noteworthy features:

The game "engine" includes a non textured polygon renderer that uses a painters algorithm instead of a zbuffer.

The game levels are declared in json files, that are sanity checked and bundled into the ROM file at compile time. The contents are parsed at runtime with serde. With this approach the user can receive more readable error messages in case of malformed file contents.

The repo contains a release .gba rom file that can be run with pretty much any accurate GBA emulator (eg. mGBA) or on real hardware with a flashcart or by flashing a bootleg cartridge.