projects / TempleOS in Web Browser

Castle Frankenstein

A first-person 3D maze game in about 600 lines.

Castle Frankenstein: a grey corridor in perspective with a purple figure ahead and a minimap in the corner

Open in TempleOS

#include "/Demo/Games/CastleFrankenstein"; Arrow keys move, Space fires, and you hunt ten monsters against the clock.

The map is a sprite drawn inside the source file. To change the level, you edit that picture. The view is made of floor and wall polygons for each grid cell in line of sight, drawn with fixed-point maths and a custom perspective transform.