Left arrow -> Turn left Right arrow -> Turn right Up arrow -> Move forwards Down arrow -> Move backwards Btw this is 100% pen, which is why it may lay a bit. Try here for better performance: http://phosphorus.github.io/#94465760
Proof of concept for raycaster based on mathematical equations: https://scratch.mit.edu/projects/94413006/ The shaded area indicates the area seen by the character If this works correctly, light should not shine through walls Advantages with this method: - Much more accurate - Less likely to glitch (if coded correctly) - Allows walls at any angles - More intuitive(?) level creation NOTE: I probably wasn't the first person to come up with this, so if you have already made something like this, I wasn't trying to copy you.