Skip to content
TPortfolio

2025

Wolfenstein 3D

A 3D project made in C with CSFML Lib. The goal: recreate all the 3D simulation of the Wolfenstein3D Game

Role
Developer
Tags
game, C, graphic, 1year
Team
  • Noé Caillaud — Developer
  • Amos Almacin — Developer
Wolfenstein 3D — hero image

A from-scratch 3D engine written in C, rebuilding Wolfenstein 3D's pseudo-3D rendering with only a 2D drawing library to work with. A year-long deep dive into the math behind real-time graphics, with no engine to hide it.

The problem

CSFML draws 2D primitives — points, lines, textured rectangles. There is no camera, no depth buffer, no 3D pipeline. To get a first-person view out of that, the game world has to be projected onto the screen by hand: for every column of pixels, cast a ray from the player through the map, find where it hits a wall, and turn that distance into a correctly-scaled, correctly-textured vertical strip. Get the math wrong and the walls warp, swim, or lose their textures the moment the player turns.

What We did

  • Implemented a DDA (Digital Differential Analysis) raycaster: one ray per screen column, stepping through the grid map to find the nearest wall hit with its exact distance and texture coordinate.
  • Corrected for the fisheye effect by projecting distances along the camera plane rather than the raw ray length, so straight walls stay straight as the player turns.
  • Textured each wall strip from the hit point, and layered in a minimap, sprite rendering for objects, and smooth movement with wall collision.
  • Kept the renderer, input handling, and map/game state in separate modules so the raycasting core stayed testable independent of CSFML.

Outcome

A playable, real-time first-person renderer running entirely on CPU-side ray math — proof that the classic Wolfenstein 3D trick still holds up as a way to learn the geometry behind every modern 3D pipeline, one ray at a time.

  • Wolfenstein 3D — gallery image 1
  • Wolfenstein 3D — gallery image 2