Very, very cool! I see you’re having trouble with the ray cast step distance creating weird artifacts on close walls. I would check out the video I shared in this other topic: Lidar Game - #2 by WoofWoof
It explains a simple tile stepping algorithm that should get you the exact distance from the walls (while still being reasonably fast) which will avoid your walls doing this thing
It’s been a long time since I’ve done something like this but at the time I didn’t even know what a Blit was, so you’re definitely doing more than I have! The other thing making the walls looking all curvy when looking down a long line of them is an issue with how the math works. You need a specific function to make sure the rays get closer together on the left and right and further apart in the middle so that it looks straight. I bet you could find a YouTube explanation, but you could also steal that code from that thing I did a while ago if you wanted. I don’t remember which YouTube video I watched for that part unfortunately.
Just saying that this is super super cool and awesome etc etc etc
etc etc…