[CF List] strange comportments with large creature summoning

Mark Wedel mwedel at sonic.net
Sun Sep 1 01:46:32 CDT 2002


Mark Wedel wrote:
>
     
     
      huet.o at free.fr
      
       wrote:
     
     
>>
     
      With that "large" creature, I had a lot of display refresh problems 
     
     >>
     
      (gtk client)
     
     >>
     
      : it's quite like the wyvern don't "visualy" move, but it apear like 
     
     >>
     
      it really
     
     >>
     
      move on the server. (but changes on the pixmap seems to work well : 
     
     >>
     
      wyvern
     
     >>
     
      sometimes look on the right, and sometimes on the left).
     
     
  I've fixed several problem with big pet monsters - the changes are in CVS.
I didn't get any display problems with the changes.

>>
     
     
     >>
     
     
     >>
     
      And another problem (but it's perhaps a normal behavior) : with "one 
     
     >>
     
      square
     
     >>
     
      summoned creature", it's possible to go "throught" : you can walk even 
     
     >>
     
      if a pet
     
     >>
     
      is on your way : it automaticaly go behind you. With Wyvern, it don't 
     
     >>
     
      work : it
     
     >>
     
      can sometimes block the way.
     
     
  I haven't fixed this - that is more problematic.

  At issue is that it is pretty easy to know that 2 one spaced objects can swap 
places.

  However, for 2 spaced objects, this is much more difficult.  Think of the 
scenario like:

  WW.
  |P|
  |.|

  Where WW is the wyverns to spaces, P is the player, and | are walls.  The 
wyvern obviously won't fit into the passage, so the swap won't work.  But there 
is also some odd issue like:

  -----
  .PWW.
  -----

  For the player to swap with the wyvern, either the player has to hop two 
spaces, or the wyvern has to swap two spaces.

  Now at least the push code does work now, so in that second example, if you 
move into the wyvern, you should end up pushing him a space to the right.  Thus, 
if your big pet isn't moving down the passage, you can sort of push him there.

  I'm not sure what to do with this long term.  One could certainly make the 
argument this is a disadvantage of big pet monsters (or the ability to swap 
places is an advantage with small pet monsters).

  I looked at the code to do the swap position - it isn't as straight forward - 
the check to see if space is available sort of needs to be custom written for 
this - first, you need to see if the space the monster is moving into has a 
wall, the player, or a piece of the monster.  But then you need to check the 
space the player wants to move into to see if it is free.

This gets pretty tricky - in the second case above, all of those would initially 
seem to check (wyvern would get moved to place player current is and place a 
peice of it currently is).  The player is also trying to move to a piece the 
wyvern is currently in.  However, that space will still be occupied after the 
wyvern moves.  So now you need to do the logic that the player would swap 
multiple spaces.  However, the player should still get effected by any bad 
things on any of those spaces (eg, pits, spikes, etc).





    
    


More information about the crossfire mailing list