Re: What's up with LOS?
- From: Stefan Dorn <lungenkrebsstattmagerquark@xxxxxxxxx>
- Date: Sun, 29 Apr 2007 13:41:45 +0200
Ray Dillinger wrote:
The second is that while illuminating squares for player field of
view, I also mark the squares with distance to the player and the
dungeon time of the FOV calculation. This gives monsters a "free"
O(1) line of sight check on the player; they just check the square
they're standing in to see if the player saw their square the last
time s/he moved. This also means that a monster standing in any
square that the player has ever seen, can just check the eight
squares next to it for more recently seen squares and squares seen
from a shorter distance and make a local decision in constant time
about how to chase and follow the player. It always goes for the
most recently seen square. Given squares seen equally recently,
it goes for the one seen from a shorter distance. I call this
ability "autochase." You have to be careful what monsters get to
use it and how much; before the player gets teleport, autochase
can make most levels unwinnable if a lot of monsters have it, or
if more than a few have it all the time.
I was wondering how this works if the player is blind. Do you still run
the LoS algorithm? What about mirrors, windows or the like? It seems
very strange (and hard to maintain) to make your AI dependant on the
player's LoS. (It's even quite unfair because monsters use information
they shouldn't have, but you already mentioned that.)
Gnarf,
Stefan
.
- Follow-Ups:
- Re: What's up with LOS?
- From: Ray Dillinger
- Re: What's up with LOS?
- References:
- What's up with LOS?
- From: John Doe
- Re: What's up with LOS?
- From: Jude H
- Re: What's up with LOS?
- From: Ray Dillinger
- What's up with LOS?
- Prev by Date: Re: Swords are annoying
- Next by Date: Re: What's up with LOS?
- Previous by thread: Re: What's up with LOS?
- Next by thread: Re: What's up with LOS?
- Index(es):
Relevant Pages
|