Raycaster engine is inspired by 90's PC games. It takes three inputs:
- 2D array representing the map
- Player (coordinates, angle of view)
- Configuration (FOV, perspective correction, metric)
Exactly one ray is cast for every single horizontal pixel of the player's screen. Ray has purpose of detecting objects in the way from player to the nearest wall. Ray stops after collision with the nearest wall and is, during its life, measured by length to construct objects and wall on the screen. Measured lengths of rays are optionally perspectively corrected. Metrics are shown if requested in configuration.
./gradlew clean build
./gradlew run
W / S - move forward/backward
A / D - turn left/right
Q / E - strafe left/right
P - turn perspective correction on/off
M - turn the metrics on/off
N / H - FOV (field of view) settings -/+
21.04.2019 version - added background image
11.04.2019 version - added collision detection, added transparent objects with texture, improved texture rendering by using two textures for one object/wall
07.04.2019 version - flexible multicore support (Tested on 8C/16T CPU. FPS were increased by a factor of 3.)
06.04.2019 version
25.03.2019 version
24.03.2019 version