Games Raycasting Algorithm Demo - Work In Progress

wonder

Expert
Licensed User
Longtime User
I almost had a brain meltdown porting this into B4x... :)

rays.PNG


So far it appear to work as expected... Give it a try. :)

Controls:
[Left-Click] Draw blocks
[Right-Click] Activate raycasting
[Right-Drag] Move light source

Note: Casting from inside a block looks broken, but it's an intentional speed-up.
 

Attachments

  • raycaster.jar
    323.2 KB · Views: 351

ilan

Expert
Licensed User
Longtime User
nice, if you want to simulate a grenade explosion then you can use it to see where is a wall and no force will go through it so if a player stand behind that wall he wont get hit by the grenade only who is in the range of the yellow lines.
 
Top