Table of Contents
Welcome to the first article of the Sonic Battle (GBA) Renderer series.
This one gives a bit of context, but don’t worry, the next one will be technical.
Sonic Battle is one of the rare titles which attempted 3D rendering on the Game Boy Advance (GBA) handheld console.
(Image by Evan-Amos [Public domain], from Wikimedia Commons)
The GBA is built for 2D graphics. It doesn’t provides a triangle rasterization pipeline or hardware acceleration for any 3D rendering essentials. 3D rendering has to be done in software entirely. It’s not impossible but it’s relatively slow and requires insane optimizations to achieve an acceptable framerate.
The console’s low resolution and limited input layout pose further difficulties for 3D games.
The winning formula
Sonic Battle side-steps all the issues:
- It applies linear transformations to 2D objects to achieve 3D rendering. This method benefits from hardware acceleration.
- The characters and other dynamic objects are rendered in 2D (as camera-facing billboards) with no transformations, so they’re not affected by the low resolution.
- The control scheme is well adapted to the GBA. The player doesn’t need to control the camera for example, reducing the amount of necessary inputs.
Sonic Battle, in my opinion, was the most successful title in solving the challenges of 3D on the GBA. Its game design and art direction deserve just as much credit but this series will focus on the renderer specifically.
So I re-created the renderer, guessing as best I could at its inner logic. I got very close: my version even displays the same rendering quirks. This series will be about the ins and outs of that endeavour.
Disclaimer: I didn’t code my version for the GBA but similar constraints were emulated. The core is fairly abstract so it’s close to the hypotethical GBA version anyway.
You can try the WebAssembly build.
If you’re not familiar with the game then check out this review for its great recordings. If you only want to see the sights without sitting through the entire video then start from 8:55 and watch for a minute or two:
The next article in the series summarizes the GBA’s rendering capabilities which is necessary background info for later articles.