The slowest part here is rendering the screen, but you can play this game in turbo mode (shift-click the flag) to make the game more playable. Calculations are based on framerate so turbo mode makes it jerky. Arrow keys to move.
simple slow raycasting method i got from https://en.scratch-wiki.info/wiki/Raycaster, which i optimized to make it faster. this kind of method doesn't work with moving objects in a map