Solved!
I've implemented ray casting (using bresenham algorithm to "draw" my ray) to check collisions and now it works
Thank you all for your answers!
Solved!
I've implemented ray casting (using bresenham algorithm to "draw" my ray) to check collisions and now it works
Thank you all for your answers!
The simple brute force way to do collision detection in a light cycle game is to have a large 2D grid of your world which you set the X,Y points of where there are walls/trails/anything you can hit. If you only need to know "Collision or not" then you can use 1 bit.
It might be the size of your world means the grid is too big (10k by 10k using 1bit is over a gig), but maybe you don't need a 1-to-1 resolution i.e. if the grid 5k by 5k, would the player notice? If the minimum speed is 2 then definitely not.
Hopefully that makes more sense.