Sting Ray is an implementation of a raycaster written in JavaScript. Raycasting is a technique used to simulate 3D graphics by projecting rays based on a 2D plane. This method was first popularized by Wolfenstein 3D developed by Id Software in 1992.
The raycaster works by emitting rays from the players position towards walls in the scene. The DDA algorithm is used to optimize the ray projection process by using trigonometric functions. This enhances the performance and accuracy of the engine.
Please note since this project is importing/exporting multiple files, you will run into a CORS block if you try to run the index.html file locally. You will need to run this from a server to get everything running. If you are using vscode, a simple way to avoid this issue is to use the Live Server extension.
-
W or Arrow Up: move player forward
-
S or Arrow Down: move player backward
-
A or Arrow Left: rotate player left
-
D or Arrow Right: rotate player right
-
To run, hold down Left Shift while moving forward or backward
- This project was programmed by matcodesalot.