[b27] FOV too permissable

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

[b27] FOV too permissable

#1 Post by Grey »

See the following image:

Image

I can see the troll behind the trees, but not target him. Technically I shouldn't be able to see him at all.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b27] FOV too permissable

#2 Post by tiger_eye »

Yup, this is known. The current FoV (field of vision) and LoS (line of sight) algorithms are rather simplistic and not 100% consistent with one another. Without making major changes to LoS, you have to choose whether you want to be able to see something but not target it, or to be able to target something you can't see. Given these two choices, the first one is probably more appropriate and is what was chosen for t-engine. Specifically, FoV doesn't perform a couple of specific boundary checks (and I think this was probably done on purpose).

If you're interested, more detail was given here:
http://forums.te4.org//viewtopic.php?f=45&t=25261
The FoV fix in that link is pretty solid, but the included LoS fix is woefully incomplete. What is needed is a smarter "line" function, 'cause line() is used many other places besides targeting.

I am working on a more modern FoV/LoS algorithm that will make FoV and LoS consistent and much more flexible. I seem to keep getting distracted by new beta releases :D as well as "real life", but I'm continuing to make progress, and it shouldn't be too much longer before ToME has a revamped, awesome FoV algorithm for people to complain about :wink: .

Post Reply