cub3D

A 3D game engine built from scratch in C, inspired by the original Wolfenstein 3D. The entire 3D perspective is rendered using raycasting — a technique that simulates depth on a 2D map without using any 3D graphics library.

cub3D demo

What it does

  • Raycasting engine rendering a first-person 3D view from a 2D map
  • Textured walls with different textures per direction (N/S/E/W)
  • Floor and ceiling color rendering
  • Player movement and rotation with keyboard input
  • Map parsing from a custom .cub configuration file
  • Strict error handling for invalid map configurations

Tech Stack

  • C — no garbage collection, full manual memory management
  • MiniLibX — minimal X11 graphics library provided by 42
  • Mathematics — linear algebra and trigonometry for the raycasting algorithm