SDL Raycaster
C · SDL2 (image, mixer)
A first-person raycasting engine written from scratch on SDL2, with a multithreaded renderer and three hand-made levels.
View on GitHubThe engine itself, compiled to WebAssembly with Emscripten.
A first-person raycasting engine written from scratch in C. No game engine and no raycasting library, just SDL2 for the window, input, image loading, and audio. Everything from the renderer to the movement and collision system is hand-written.
Features
- A textured raycaster with half-height and hanging blocks, holes you can look down and fall into, and pillars, all driven by the map characters.
- Multithreaded rendering that splits the screen into vertical strips across the CPU cores with SDL threads, and a z-buffer for correct depth ordering.
- Walking, running, jumping, crouching, and crawling, each with its own eye height, plus gravity and circle-based collision.
- Mouse look and vertical look with full gamepad support.
- Three hand-made levels dispatched through a function-pointer table, with triggers that carry the player state from one level into the next.
The wall, floor, and ceiling textures are from the Tiny Texture Pack 2 by Screaming Brain Studios.