A GBA game more-or-less loosely intended as a demake of Mindustry (Changes planned largely due to technical limitations).
The quickest way to get started under Linux/macOS is to use https://nixos.org/nix/ as a dev environment. Just run nix-shell
in the project directory.
Once set up, all that's needed is to run git submodule init && git submodule update && cargo make assets && cargo make run-qt
to clone the Mindustry submodule, build assets, build the game and start it in mGBA. Alternatively, cargo make assets && cargo make debug-run
creates a debug build and launches it in mGBA, waiting for a GDB client to attach on port 2345
(you should strongly consider using our VScode debug config, as all the annoying setup has already been done for you there).
cargo make assets && cargo make test
runs the tests.
NOTE: If you change the Mindustry assets/the asset generation script you have to run cargo make assets
manually. The process is manual because rebuilding them takes a long time.
When developing the game, please keep in mind which subsystems use which resources (and expect exclusive access to them). Otherwise, fun debugging will ensue.
IWRAM:
Entirely used by static variables and the stackEWRAM:
Entirely used by the global allocator (heap)OAM
: Entirely managed by the HW sprite allocatorSprite palette:
Entirely managed by the HW sprite allocatorBackground palette (slots 0-15):
Used by the text engineBackground palette (slots 16-255):
Entirely managed by the background systemCharblocks 0, 1:
Entirely managed by the background systemScreenblocks 8-11:
Entirely managed by the background systemCharblock 2:
Entirely managed by the text engineScreenblock 24:
Entirely managed by the text engineScreenblocks 25, 26:
Used by instances ofcrate::menu::Window
Charblock 3:
Unusable, as it overlaps the screenblocks we useWindows:
Entirely used by instances ofcrate::menu::Window
Backgrounds 0, 1
: Used by backgroundBackground 3
: Used by text engineBackground 2
: Used by windows