Re: What's up with LOS?
- From: jude@xxxxxxxxxxxxxxxxxxx (Jude H)
- Date: Sat, 28 Apr 2007 01:58:27 GMT
Ray Dillinger <bear@xxxxxxxxx> wrote:
Jude H wrote:
For myself, it wouldn't be worth the time, since recursiveWell, let's see: I use spiral-path for O(N) player and monster
shadowcasting meets all of my current and likely future requirements.
light radii (where N is the number of squares lit) and also for
O(N) player field of view. I've made two simple variations in
the algorithm not mentioned in the article on roguebasin, though.
Just to clarify: I wasn't meaning to indicate that recursive
shadowcasting is the be-all and end-all of LOS, just that I don't
forsee any need to replace the underlying LOS algorithm in my own
project.
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.
I am using a very similar system of marking the time of the calculation
for some of the benefits you describe. However:
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.
I had not considered the AI implications. Thankyou! :)
<snip>
One thing I think will work well, but haven't done yet, is that
most monsters only get autochase when they actually *see* the
player character, and depending on monster INT, the ability
doesn't last very long.
Yes, it would certainly have to be moderated by *something*, or it would
feel rather unfair.
Thankyou for the ideas.
--
--j hungerford.
Another Roguelike In Development:
http://arid.sourceforge.net
.
- 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: What's up with LOS?
- Next by Date: Re: Crash Course To The Roguelike Development
- Previous by thread: Re: What's up with LOS?
- Next by thread: Re: What's up with LOS?
- Index(es):
Relevant Pages
|