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

Re: cheating & LOS



>  But the protocol I proposed does not require you send
>  every single visible square every time you move.  It
>  requires the server to send every square once when it
>  _becomes_ visible.  After that the server doesn't need
>  to concern itself with that square at all until it becomes
>  invisible again.  And by invisible I mean outside the
>  LOS -- just having items (like monsters or more common
>  objects) on the square does not make it invisible.

Right, but squares outside your line of sight come and go continuously,  
every time you move.

Take this ASCII (!) example:

                    /
                   /    |
XXXXXXXXXXXXXXXXXX/     XXXXXXXXXXXXXXXXXX
     M             

XXXXXXXXXXXXXXXXXX\     XXXXXXXXXXXXXXXXXX
                   \    |
                    \

                  |       /
                  |      /
XXXXXXXXXXXXXXXXXX/     XXXXXXXXXXXXXXXXXX
          M             

XXXXXXXXXXXXXXXXXX\     XXXXXXXXXXXXXXXXXX
                  |     \
                  |      \

                \        /
                 \      /
XXXXXXXXXXXXXXXXXX      XXXXXXXXXXXXXXXXXX
                    M             

XXXXXXXXXXXXXXXXXX      XXXXXXXXXXXXXXXXXX
                 /      \
                /        \


                \       |
                 \      |
XXXXXXXXXXXXXXXXXX      XXXXXXXXXXXXXXXXXX
                                M             

XXXXXXXXXXXXXXXXXX      XXXXXXXXXXXXXXXXXX
                 /      |
                /       |


A lot easier to understand than binary, hunh?  ;) Anyway, every time you  
move, you're transmitting the new squares becoming visible on the right  
hand side -----> of the screen.  You're also re-sending ALL the squares  
that are becoming visible/invisible.  If you had a mask that did this for  
you, you're transmitting a very small value, and you don't have to  
re-transmit the same stuff over and over again.

This is just a simple example.  In a more complex room, you could be  
sending butt-loads of MAP commands every time you move.  With a constant  
number of squares becoming visible each movement, you're better off in  
terms of optimization and such.

If you had a 


  NEWMAP object1 object2 ... object 11 mask

command each time you moved, it would be in ONE IP packet (not MULTIPLE  
packets, each of which has 64 bytes MINIMUM of header, with X bytes  
following).  AND, it wouldn't have to be limited to 11 map squares.  You  
could exchange client visibility with the server at start up, and the  
command could be:

  C:  SET VIEWSIZE n m
    .
    .
  C:  MOVE x y
  S:  NEWMAP object1 object2 ... objectn mask

If you move diagonally, it could be:

  S:  NEWMAP object1 object2 ... objectn mask
  S:  NEWMAP object1 object2 ... objectm mask

Alternatively, since this is a little redundant, you could make the move  
command a little more restrictive (since you're always in the middle of  
the screen:

  C:  MOVE [N,NE,E,SE,S,SW,W,NW]

In which case the server could send a different packet for NEWMAP:

  S:  NEWMAP object1 object2 ... objectn object1 object2 ... objectm mask

-jason
____________________________________________________________
 Jason Fosback, Systems Engineer   | No sir, I didn't like it
  --- Paradigm Systems Corp ---    |                 -R&S
Internet:  jason_fosback@psca.com  | Star Trek:
NeXT mail: jason_fosback@psca.com  |  The NeXT Generation...