just a basic field of vision test, needs work but is pretty good. mostly pen, so might lag a bit space for flash I suggest using 80-90, for decent visibility and little lag
Basically how this works is this: The sprite that does the pen makes the black background over the entire screen. Then, it makes two lines that do the limit work of the vision. Then, 20 others are made, and each one goes out until it either is as long as the limit or it touches the ground. When this happens, it stops and starts on the next line. The the pen sprite returns to the player. You can actually see the ground because of the way that Scratch works. Scratch's layering system makes pen items go beneath the sprites. This can be taken advantage of easily, but you must be careful when doing so. If I were to leave out the sensing part, the FoV would extend beyond the potential walls, and might show something beyond them! That would not be good, would it? Therefore, the sensing script is important.