Fun with Ray Casting - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: a740g (https://qb64phoenix.com/forum/forumdisplay.php?fid=56) +---- Thread: Fun with Ray Casting (/showthread.php?tid=3372) |
Fun with Ray Casting - a740g - 01-13-2025 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. Code: (Select All) CONTROLS: 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. RE: Fun with Ray Casting - Bhsdfa - 01-13-2025 Code: (Select All)
I didn't know that making a type variable as a type was even possible :o |