The code shown is mostly from the YouTube guide by Coder Space (https://www.youtube.com/watch?v=ECqUrT7IdqQ). I was interested in how pseudo-3d works and am hoping to turn this project into a stepping stone for higher-level projects in the future. This is essentially an engine that can easily be added to at this point, and all it is is simple trigonometry. Multiple rays are cast according to their respective angle, where upon intersection wit a barrier, will calculate the distance from the player to the barrier. This distance (or depth as it is called in code) dictates the height of a rectangle which will be drawn at the apporpriate location on the screen. Hunderds of these thin rectangles create the illusion of depth, and hence the illusion of a third axis.
Fecici/Doom-raycast-engine
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|