Ray-Casting
This project recreates the ray-casting method used in classic 3D video games such as DOOM and Wolfenstein 3D. The method involves shooting rays through a 2D array for every vertical row of pixels, where the height of the darkened “wall” is determined by the length of each ray.
by Timothy Clocksin
Overview
- Ray-casting Technique: Simulates a pseudo-3D environment by calculating wall heights based on ray distances.
- Early 3D Games: Inspired by the mechanics and graphics of DOOM and Wolfenstein 3D.
For a detailed technical explanation of the ray-casting technique, refer to Lode Vandevenne’s tutorial.
Controls
- UP: Move forward
- DOWN: Move backward
- LEFT: Turn counter-clockwise
- RIGHT: Turn clockwise
Source Code
The source code for the engine can be found here: Download RaycastEngine.txt