Re: What's up with LOS?



Jude H wrote:
John Doe <NOTOSPAMjohndoe64738@xxxxxxxxx> wrote:

Are all the LOS ideas I've read about in here on roguebasin? If not,
would you please transfer them there?


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.

One is to mark squares as visible iff there's a center-to-center
lineofsight. ie, light can pass through a square without making
that particular square (or monsters in it) visible, provided it
doesn't pass through the square's center. This means that sight
checks are always mutual; if you have line of sight on a monster,
it has line of sight on you.

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.

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.

Bear



.



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: 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: 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 it simple, stupid!
    ... Just mark squares withing a certain radius of the player as seen after ... The talk here about simplifying FOVs has made me think about using ... resort to something simpler and worry about more realistic vision much ...
    (rec.games.roguelike.development)