A short demonstration of the simplest 3D graphics algorithm.
*What is RayCasting ?
-Raycasting is a rendering technique to create a 3D perspective in a 2D map.
-The basic idea of raycasting is as follows: the map is a 2D square grid, and each square can either be 0 (= no wall), or a positive value (= a wall with a certain color or texture).
*How Ray Casting Work ?
-It fires the ray from the player's spot and gets the ray's length when it touches the wall.
-From the length it calculates the size of the individual columns and their color
Green Ray - what you see
Blue Ray - Reflection that is rendered
Yellow Ray - Reflection which didn't hit anything and is not rendered