It all started with this post.
This is an implementation of the Voxel Space ray casting in QB64-PE. The algorithm is explained here.
You'll need QB64-PE v4 to compile and tinker. This is just a demo, not a complete game. At best, it can be called a walking simulator.
The demo is configured to best perform for my Ryzen 5600x system. If you see low FPS, tweak the RENDER_DISTANCE and RENDER_DELTA_Z_INCREMENT constants at the top of the source code.
Mouselook may be broken on Linux because of how _MOUSEMOVEMENTX/Y is implemented in QB64. We'll fix this soon™.
Have fun. Cheers!
Adding my original solid-wall RayCaster here for completeness. I'll keep posting other ray-casting-related stuff in this thread in the future.
This is an implementation of the Voxel Space ray casting in QB64-PE. The algorithm is explained here.
You'll need QB64-PE v4 to compile and tinker. This is just a demo, not a complete game. At best, it can be called a walking simulator.
The demo is configured to best perform for my Ryzen 5600x system. If you see low FPS, tweak the RENDER_DISTANCE and RENDER_DELTA_Z_INCREMENT constants at the top of the source code.
Code: (Select All)
CONTROLS:
KEYBOARD:
FORWARD: W / UP
BACK: S / DOWN
STRAFE LEFT: A
STRAFE RIGHT: D
TURN LEFT: LEFT
TURN RIGHT: RIGHT
NEXT MAP: SPACE
MOUSE: MOUSE LOOK
Mouselook may be broken on Linux because of how _MOUSEMOVEMENTX/Y is implemented in QB64. We'll fix this soon™.
Have fun. Cheers!
Adding my original solid-wall RayCaster here for completeness. I'll keep posting other ray-casting-related stuff in this thread in the future.