Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cheating & LOS



From: Philip Brown <philb@soda.berkeley.edu>
> It costs the server extra time vs the full transmission method.
> 

> Full transmission just says:
> 

>    Check all squares that have changed , in vicinity of player, and
>    send.
> 

> This is a constant order of calculation.

But squares virtually never change.  Well, you may break through fake  
walls or destroy doors, but apart from that almost all squares are  
constant.  I do not understand what you mean here.

> With precalculated LOS... I think you may hav to do som extra
> handling on the server. I'm not sure you can automatically say
> ONLY...
> 

> "send squares in vicinity of player that have changed in that update,
> and are in line of sight".
> 

> AHA! Now I remember. It also has to keep a per-player line-of-sight
> map. This is so the server can send across stuff that just came into
> view, reguardless of whether it actually changed, last update.
> Likewise, it has to check and see if anything was visible last round,
> but out-of-sight this round, and blank it if so.

The client/server protocol does not have "rounds".  Yes, the server has  
to keep LOS maps, both for computational efficiency and for the sake of  
the protocol.  Whenever an item moves or changes, the server goes  
through the list of the LOS maps for all players and immediately sends  
ITEM commands to all the players for whom the item is in the LOS.  When  
a player moves (or an item with effect on LOS is destroyed or created  
inside the players LOS) a new LOS map is created for the player.  Then  
the server compares the old and the new LOS maps and sends a single MAP  
command for all the squares in the new LOS and not in the old and a  
single UNMAP for all the squares in the old LOS but not in the new.   
Then the old LOS map is discarded.  That is the entire display code in  
a nutshell.  There are no "updates".  There are no "rounds".   
Everything happens instantly.

And yes, it is true that the server has to keep a LOS map for each  
player.  But it does not have to keep a map of "what the players screen  
looked last time" and constantly call update functions to draw a new  
screen, compare it with the old screen and then send adjustment  
commands.  That is certainly more overhead than a single simple LOS  
map.

> Aha. Which brings us to the point that your method has a slight hole
> in it. You can't just "not transmit" blank spots. You hav to also
> have an explicit "blank this spot" call.   Apologies if you covered
> this already.

Yes, it was listed in the proposed protocol.  It is called the UNMAP  
command and it is followed by a list of all coordinate pairs which went  
out of the line of sight.

	Carl Edman