Labyrinth
My master’s thesis at the University of Latvia (2008, supervisor Doc. Kārlis Freivalds): Steel Engine, grown to about 30,000 lines of C++, and Labyrinth, a networked race through a generated maze, as its demo. I founded and led our DiVision team and wrote everything except sound, which was by Andrejs Movļaiko. Highlights: per-pixel lighting in GLSL, where every combination of light count and material flags compiles its own shader once and is then cached; shadow volumes with Carmack’s reverse, chosen over shadow mapping for exact shadows; a visibility algorithm for mazes that made a 100×100 labyrinth playable instead of 14×14, because the number of drawn objects no longer depends on the maze size; and a network protocol on top of the enet library with a sync method of my own, penalty synchronization — bodies of different players may briefly overlap, and forces push them apart.