thing block count so far: 110 W to move forward S to move backwards A and D to turn Left and Right V to toggle debug screen where you can change settings. WARNING: Ray Step is how much of a step the raycast takes every check to see how far away a wall is, lower setting will be more accurate but will be more laggy, I suggest 0.5 for low-end devices like laptops. WARNING: Resolution will make your game laggier the higher it is (obviously) I recommend around 50 for low end devices, but try out different settings if you want to and find what is right for you.
the one glitch is that when you face south it glitches out the raycaster because that is where degrees on scratch go from -179 to 180 and that glitches the whole thing out and makes it display part of it offscreen so uhhh if anyone can help that would be much appreciated other than that its pretty good its a little distorted but I just would have to change some values around to fix that If ANYONE is smart enough to fix this pls help I've tried like 5 different ways and it tweaks out every time ik this is slop but I wanted to try to make my own raycaster before I tried any tutorials because I thought it'd be a fun exercise. It turned out to just be a bunch of annoying math not very fun