2015 to 2017
See also...

Other projects in the field of software rendering:


A polygonal software renderer


High quality raytracing

Castenstein is a raycaster. The name derives from Wolfenstein 3D, a popular game from the 90's. Raycasting is a rendering technique, which was popular back in that time, because computers weren't powerful enough to handle polygonal software rendering. Instead of rendering triangles, a raycaster renders a grid of blocks which are on a 2D basis, displayed in 3D. That's why raycasters are often called 2.5D engines - they look pretty much 3D, but are very much two dimensional in terms of math. Raycasters are considerably faster than polygonal software renderers due to the computational simplicity. In exchange, raycasting has its limitations. For example, you can't really tilt up and down. If you can, it's just vertical shifting of the screen, which results in a skewed image - i.e. if you tilted down at an angle of 90°, the image would be infinitely skewed.

You can, however, do some moving up/down and tilting up/down as well as rendering sprites additionally to walls. Different brightness and fog levels are pre-calculated resulting in very high performance with little compromise on graphics. Castenstein also takes benefits from multi-core CPU's, supporting multi-threaded rendering, since raycasting is a task that can be very easily parallelized.

Raycasting in this form doesn't have any particular use nowadays. It has been widely replaced with polygonal renderers, later on implemented by hardware (Direct3D and OpenGL).


  • Textured walls, floors and ceilings
  • Sprites
  • Sky
  • Lighting & Fog
  • Drop-down shadows from ceilings
  • Collisions
  • Moving up/down & tilting up/down
  • Minimap overlay
  • Multi-threaded rendering