[CF-Devel] reduction of data when casting spells

Preston Crow crow at bear.cs.dartmouth.edu
Fri Apr 13 08:58:57 CDT 2001


Philipp Currlin wrote:
>
     
     What I meant was merging all the spells of one type, so if you get hit
     
     >
     
     by cold cold fear cold fear poison you only see cold fear poison.
     
     
You mean letting spell effects merge like ordinary items so you see:
   7 fires
   3 slows
   2 colds
     floor

This probably would require special code, since I doubt you can merge
the objects internally, since they have different timeout values, and
they probably have other values that are different.

However, it would be possible to make this a special case for the code
that sends items to the client, where any time it sees a spell effect,
it counts the number in the stack and sends it with that count, noting
on the side not to send that effect again this tick.

Mark Wedel wrote:
>
     
     1) The tiles as they appear in the map window (where the player icon
     
     >
     
     is).  In that case, no more than 3 tiles will ever be sent for any
     
     >
     
     space (and its typically a floor plus two objects above it).  One of
     
     >
     
     the things on the drawing board is to have the number of objects send
     
     >
     
     here more settable
     
     
That would be a great idea.  Even better would be if the server could
detect lag (how much data is in the send buffer for the connection at
the start of the tick) and adjust the setting dynamically.

>
     
     2) The look window is a different category.  Currently, 50 objects can
     
     >
     
     get sent to the client each tick.  Note the number of spells shown
     
     >
     
     could be reduced or even eliminated in this window.
     
     
Again that could be dynamic.

I've thought that it would be cool if the server could only send, say,
5 items per tick, but if the square doesn't change, they would be the
next five items down from where it left off.  This probably isn't
supported in the protocol, unfortunately.  Otherwise, you could sit on
a large stack, and if you wait long enough, you would eventually see
all the items.

By the way, currently the fake item at the end of the sent items says
to click on it to see the rest of the items.  That doesn't seem to
work, at least from the GTK client.  Perhaps it should just say "more
items you can't see" or something like that.

--PC

    
    


More information about the crossfire mailing list