Above you see a particularly bad gif recording of what I have done today.

Utah Teapot – GBA

I had always wanted to do something like this on the GBA, just a simple 3D projection with some sort of rotation. I had initially had the idea to make a 3D representation of the GBA’s bitmap rgb color space, but never went through with it. I did however create this…

So for this project I started with making a cube and using rotation matrices to get it to rotate. Then I combined them all together into one big function that would calculate all rotations at once based on the input angles.

I tidied up the code and added the ability to control the rotation with the D-pad and L/R buttons, and then I just had to get some point data for the Utah Teapot in a useable format. Luckily, I could export it from blender as a .ply, which gave me the coordinates of each vertex, and was easy to turn into an array.

I tried making all the optimizations I could, without spending too much time on it, and I did good enough. I tried messing around with some LUTs for the sine and cosine functions to make it run better, since the GBA doesn’t really like doing these, not to mention it has to process about 1000 doubles each frame (or at least it tries), and that’s all done through software instead of hardware. Could I have done some stuff in assembly then? Sure, but I didn’t feel like it.

If you are interested in checking out the compiled “game” for yourself, click this button to download the rom. Alternatively, you can find it on my downloads page.