Screenshot in 1080p

I had some fun writing a simple real-time ray-caster and a triangle rasterizer years ago as a student, and recently wanted to implement another of these old 3d rendering algorithms.

I remembered being impressed by the voxel rendering of the Outcast and Delta Force games as a child, so it was an obvious next step. This project was a nice way to use my new PocketGo mini-game console. The processor is very weak compared to any consumer game console, which would bring some interesting challenges. s-macke’s GitHub project VoxelSpace was a major source of inspiration. It is a good introduction to this rendering technique. JavaScript would not be able to render anything fast enough on this kind of hardware. This was a good opportunity to try something a bit faster, and even more modern: rust.

Along the way I made a small docker image with BuildRoot, the arm9 toolchain and rust to build the sources. It was necessary because rust is moving so fast that there were no guarantees that future versions would still work.

I tried several tricks to reduce the memory footprint by using a colormap (8bit palette) but in the end it was always a little bit slower, probably because the full texture is already small enough to fit in caches. I got the best performance improvements by switching computations to fixed-point as the PocketGo lacked a hardware FPU.

The source is on github