This project was inspired by a playthrough of the re-released version of the original DOOM games from the 90s on PC. This was one of the first-ever first-person-shooter (FPS) games, with state-of-the-art graphics.

Download

Version: 1.0.0 / 14.02.23

The rendering technique is based on a very simple principle. The world consists of a 2D grid. From the players’ perspective, the camera casts out a ray for each pixel on the horizontal axis. The length of this ray until the nearest intersection point with a wall tile on the grid, determines the height of the vertical wall. Because the world consists of a 2D grid, checking for collisions with a wall is super fast and efficient.

The project was a fun and insightful introduction to graphics programming and programming in C++.

For further details on how raycasting works, check out the excellent Lode’s computer graphics guide.

Demo