Movements are similar to joystick. The red thing is the centre. Change how far you can see by changing the ‘vision’ variable.
Just some open source code. I changed the light to be drawn in pen so you can’t see through walls. If you are using this, make sure your walls aren’t too thin, as otherwise the light goes through.