A couple of months ago I shared the early `0.1.0` prototype of ZamGBA (an open-source GBA SDK and 2D engine written in pure Zig). Since then, I’ve been focusing on solving what always felt like a big friction point in retro homebrew: the asset pipeline.
Starting from v0.3.2 (which is updated for Zig 0.17.0), I've built a companion CLI pipeline (`zurag`). It allows I directly convert the assets from famous indie game development tools to Zig code:
* Aseprite JSON + PNG -> Native Animation Data: Instead of manually slicing sheets or tracking frame offsets, `zurag` reads Aseprite's JSON metadata and sprite sheets, packs 8×8 tiles, preserves animation tags, and supports both static VRAM preloading and VBlank DMA streaming for larger animations.
\* LDtk `.ldtk` -> Mode 0 Tilemaps &* `IntGrid` Collisions: It parses LDtk projects directly, deduplicates 8×8 tiles, outputs 16-bit `ScreenEntry` maps, and maps `IntGrid` layers into the engine's continuous sub-pixel (`Fixed24_8`) `moveAndCollide` physics.
The zurag tool is deeply integrated into Zig build system, which
Besides, 0.3.2 adds a rich set of APIs required for 2D game development:
* Modern 2D Engine Primitives: Added a `Camera2D` (lerp smoothing, deadzones, screen shake, frustum culling), multi-layer parallax scrolling, and mGBA register console logging. I intentionally mimic a Godot-like API style to build modern development experience.
* Zero-Config Build: Because Zig bundles its own cross-compiler and linker. There's no dependency to`devkitARM`—just Zig 0.17.0+ and an emulator like mGBA is good to start development.
Links:
* Short Video Demo: https://youtu.be/D57tNEU7OQ8
* GitHub Repository, with 17+ runnable demo ROMs: https://github.com/tsetseggames/zamgba
* Best showcase: https://github.com/tsetseggames/zamgba/blob/main/demo/engine/tilemap_collision.zig
Honest limitations: It’s still an active work-in-progress. Bitmap font/UI layers, SRAM saving, and audio (PSG/DMA PCM) aren't in yet—those are lined up for `v0.4.0` through `v0.7.0`.
For anyone here who has built 2D games for the GBA or similar tile-based hardware: how do you usually structure your collision layers for larger scrolling levels—do you keep a separate flattened collision grid in ROM, or derive solidity directly from tile indices to save space?