← Timeline
2000 · BASIC, Pascal & olympiads

Lamer-Killer: 3D with no engine

A top-down shooter with a classmate that turned into my own software 3D renderer — no engine, no GPU, every pixel computed on the CPU with a projection formula I derived myself, years before I knew how Doom did it. I had read nothing on the subject and knew nothing about matrices: I figured I could rotate the scene with sines and cosines, and get screen coordinates by dividing the distance from the axis by the depth. I split every triangle into two, walked down its two sides in a loop and filled the lines between them in a nested loop. There was no depth buffer: I sorted the faces by distance and drew them from far to near, so the near ones painted over the far ones. The farther a face was, the darker I painted it: not lighting, but, as in Doom, far objects were darker, and that gave a sense of depth. The level editor stored the map as a walkability grid, and an optimiser merged long walls into single polygons.

PascalSoftware rendering

Video