FOV

by Bravo1
A short supplemental library to include field of view!
Can you package the entire folder as-is, and like send/page it to me? I'll see what's up.
Hey, I just worked with the demo and added walls. Doesn't matter if anything is behind a dense object, aparently it's still in the FOV which kind of makes sense but it's not visible.

In this case I don't really see much of a reason for the library. I dunno, maybe someone can think of a purpose but what I would have liked to do was not to display any mobs which aren't in FOV Sight.
Well it IS in the FOV, the mobs are just obscured, if you want to do the full check, you should use FOVlist() and check to see if there are any turfs at the same (or similar) angle to the mob you're looking at.


The best way to do this though, instead of checking the angles of ALL the turfs in your FOV, get the list of turfs from your.x,your.y to target.x,target.y, then exclude the turfs that don't appear in both lists, then check those turfs. Unless the FOV is >90 this saves some runs of get_angle.


OR you could just set opacity to 1 on the solid turfs, which would exclude the mobs automatically from the view() calculation that both FOVlist() procs do. If you're doing it for a single mob, call if(mob in view()) to exclude them from the inFOV() check being done.


You can definitely do it but there's many ways to get the job done, so I felt like it'd be up to the user to figure out how you wanted to do it.
Page: 1 2 3