[crossfire] Re: LOS and lighting map redo

Bernd Edler edler at heydernet.de
Mon Sep 12 16:59:07 CDT 2005



On Tue, 6 Sep 2005, Mark Wedel wrote:

>
     
      Trying to figure out which side the light is coming from now means that the 
     
     >
     
      light has to be individually figured for each player - this would add a non 
     
     >
     
      trivial amount of cpu (although may be possible with simple coordinate 
     
     >
     
      checking - I'd have to thinkg about that more)
     
     >
     
     
     
I think, coordinate checking might work nicely:



                       123
                       8W4
    P                  765


W = Wall

1-8 relevant adjacent squares

depending on player position we make the light as bright
as the relevant neighbor. The relevant one is just the one
that if it had blocksview=1, then W would be blocked from view.
Thus the "reference" square is not a wall itself.

Alas, if P is a player, both 8 and 7 are relevant.
If only one of them has blocksview=0, then the choice is
obviously easy. Else we can make an average or take the
brighter one. Their lighting level probably does not differ much
anyway.


That ought not to be more complex then LOS calculation itself.




    
    


More information about the crossfire mailing list