2D shooting game utilizing a ray-casting algorithm for the game mechanics. The player must use a limited angle and view to shoot enemies, with randomly generated wall blocks that change the gameplay experience each time.
HTML, CSS, Javascript, p5.js, Algorithm
- Cast rays by offsetting angle (trigonometry)
- Find the intersection point between ray and wall (line-line intersection)
- Find the closest intersection point (pythagorean Theorem)
- Draw the areas by points (p5.js)
- Draw the flashlight by clip (p5 clip function)