Fyi, there’s way better algorithms out there for something like this; raycasting against uniform sized tiles can be done with an algorithm called DDA, and arbitrary collision maps can be raycasted very quickly using signed distance fields. Also you can just find corners and project outwards toward them, no “raycasting” in the typical raymarcher sense required at all.
I’m self taught so I don’t know of much methods… I think tricxta’s version is amazing and how could he put that together so quick amazes me.
I’m definitely a lower tier programmer.
Is what tric did the DDA algorithm?
He did the naive brute force method, DDA is a slight improvement over that because it doesn’t require tiny discrete steps, it does the minimal amount of raymarching possible.
DDA and a signed distance field are both very similar, SDF is like DDA but built for an arbitrarily sized point cloud. So minimal stepping in a raytrace/raymarch, but for any shape you’d like.