[crossfire] LOS and lighting map redo

Mark Wedel mwedel at sonic.net
Tue Sep 6 02:19:19 CDT 2005


  On thinking this over some more, there is also another complication/issue with 
lighting.

  As said in the original message, instead of the server communicating darkness 
of each space, it communicates the location of the lightsources and color of 
those sources.

  However, what do we do when the source of the light is not visible to the 
player?  One could envision something like long hallway, with light pouring into 
the hallway form the rooms that branch off from it, but one can not see those 
sources.

  To me, there are really 3 options here:

1) Only send info on light sources that are on spaces player can see.  This is 
safest and isn't hard to do, problem is that it is probably mostly useless (vast 
majority of lightsources will not be visible to player).

2) Send info for lightsources that illuminate any spaces player sees.  While 
this gives information away, one could argue it is a pretty minor leak (EG, 
given how current client communicates light levels, once could potentially 
figure out where light sources are based on illumination of different spaces). 
It does complicate things some, because we need to record location of light 
sources that illuminate on the space - however, that probably isn't actually 
that hard, since we'd have to go by 1 by 1 for the light sources and see what 
they illuminate anyways - the issue here is that we now need to record that info 
(light source and 10,10 is illuminating this space).

3) Send all light sources for map area, regardless if visible or not.  Easiest 
to do, but starts to give away a fair amount of informatin, especially for non 
static light sources (hmmm - a lot of light behind that wall - must be something 
there) - probably not a good option.

--

  Also, one other complication to this plan is the fact that light sources 
outside the viewable map would have to be sent.  And the brighter the source of 
light, the more spaces outside the map to be sent.

  For example, imagine a wilderness area of grass at night (all dark).  Another 
player carrying a super bright latern (glow radius 15) is approaching you. 
While he is 14 spaces from appearing on the map, his latern starts illuminating 
spaces youcan see.  So it means we need to send info for a light sources that is 
14 spaces from where you can see.

  This can be adjusted a bit based on how bright we want the maximum light 
sources.  But it also adds some extra complication for the client beyond big 
image support - it now has to go out quite a ways looking for light sources. 
Likewise, this also means the protocol needs some support for negative 
coordinates (player could be approach from west after all).


    
    


More information about the crossfire mailing list