/javascript-ray-casting

Ray Casting engine built using p5.js to render all the graphics. It attempts to simulate a pseudo 3D environment from a 2D map.

Primary LanguageJavaScript

javascript-ray-casting

javascript-ray-casting is a Ray Casting engine built using p5.js to render all the graphics. It attempts to simulate a pseudo 3D environment from a 2D map

This technique was very popular in game development in the 90s, when computer could not simulate a fully 3D environment in real time. Ray casting can go very fast, because only a calculation has to be done for every vertical line of the screen. Some of the most well known games that used this technique, are of course Wolfenstein 3D and DOOM.

For a more in depth explanation of the calculations involved, I recommend the following awesome tutorials:

d3-mini-game gameplay screenshot

d3-mini-game gameplay screenshot

d3-mini-game gameplay screenshot