Click Screen to Use WASD


This is a JavaScript port I made of Lode Vandevenne's C++ Raycasting example. See the original version and a solid introduction to raycasting here. This is the first example and an untextured raycaster. Raycasters use a semi-3D graphics technique that takes advantage of the fact that there is no vertical movement or angling to greatly simplify the math and allow for level and game design strategies similar to 2D games while producing 3D looking graphics.

It is also possible to build full 3D graphics engines in JavaScript using software rendering where you explicitly dictate the value of each pixel in the JavaScript code. And of course you can create more advanced and modern 3D graphics in HTML5 games if you use WebGL and GPU-accelerated 3D rendering. For a very simple example of 3D software rendering in JavaScript, see the Wireframe Demo which draws SVG polygons to the DOM to produce a 3D cube.
Get the code: Raycaster GitHub Repo