Re: What's up with LOS?



Ray Dillinger <bear@xxxxxxxxx> wrote:
Jude H wrote:
For myself, it wouldn't be worth the time, since recursive
shadowcasting meets all of my current and likely future requirements.
Well, let's see: I use spiral-path for O(N) player and monster
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
.



Relevant Pages

  • Re: Whats up with LOS?
    ... Oline of sight check on the player; ... squares next to it for more recently seen squares and squares seen ... from a shorter distance and make a local decision in constant time ... You have to be careful what monsters get to ...
    (rec.games.roguelike.development)
  • Re: Towards less atomic moves in a roguelike
    ... It's tempting to add in bonuses that increase the number of steps the player can take, but it can lead to things like this: ... If the monster has a message priority setting less ... If the message priority setting is high enough, ... as a monster moved into squares within 5 squares of the player and ...
    (rec.games.roguelike.development)
  • Re: Best formula
    ... have good references for its solution. ... Suppose for instance that, for each player, ... his or her position at the previous tournament; ... for under "least squares". ...
    (sci.math)
  • Re: keep moving forward
    ... I have considered this for POWDER, but rather than Mana only, I'd tie ... unmapped/unvisited squares. ... Normal exploration gives the full value, ... Then the player at ...
    (rec.games.roguelike.development)
  • Re: Whats up with LOS?
    ... Oplayer field of view. ... One is to mark squares as visible iff there's a center-to-center ... This means that sight ... This gives monsters a "free" ...
    (rec.games.roguelike.development)