Inspiration

Wanted to create a three dimensional game from scratch and learn how basic 3d graphics worked.

What it does

Simulates 2d scene and raycasts from the player/camera over many angles in their field of view. Uses the distances from the player to determine how tall the wall should be at that x-coordinate.

How we built it

Created two iterations of the program in order to make it faster and condense multiple classes together.

Challenges we ran into

Some walls continue infinitely while others are cut short. Movement behaves unpredictably when player's coordinates are outside of the first quadrant. Finding a way to represent the map in a way that is understood by the program was difficult. The camera has a constant fish eye distortion.

Accomplishments that we're proud of

Extremely lightweight with 235 lines of code.

What we learned

Basics of raycasting. Recursive flood fill algorithms (in first iteration). Implementation of key listeners in java. Integrating many classes together (in first iteration).

What's next for Java Raycasting Engine

Fix fisheye distortion, input issues, and wall rendering issues. Add gameplay mechanics to the engine.

Built With

Share this project:

Updates