[crossfire] Face "overlays"

Mark Wedel mwedel at sonic.net
Thu Jul 14 22:41:44 CDT 2011


On 07/14/11 06:35 AM, Nicolas Weeger wrote:
>>    But is the client assembling these images, or have all these images been
>> pre-assembled on the server (and thus, they are valid images)?
>
> That's one my questions, and something I'm asking other people for opinion :)
>
>
> Two options, server sends all needed faces at the same time ("overlays to the
> player face") ; or server sends a special face the client knows to be a
> combination of faces.

  Ah - so it sounds like you are looking at one of these 2 possibilites:

1) Server sends all needed faces for the player - this means that for a player, 
it may have to send 4+ images for the player (aura, armor, weapon, base image) - 
of course, this could be higher.

2) Server generates a composite face, sends information on what that composite 
face is, and thus only needs to send 1 face in the protocol command, but it may 
end up sending a bunch of other information for to tell the server what that 
composite face is.

  My gut instinct is that #2 would actually be easier.  For #1, I think it may 
require potentially more protocol changes (there may be issues with number of 
layers, so some extension for that, and the map send code would have to look at 
the object and see if that given object has overlays that need to get sent, look 
those up) - I'm just not sure how efficient that would be.

  In case #2, all the map logic is basically unchanged (note that some extra 
logic would be needed to send non layered face information for old clients) - 
the generation of the composite face can all be done when the player equips the 
items/does those actions.

  But I guess it really depends on how hard it is to check the layered faces for 
an object, or maybe additional structures are needed to hold those.  I'm just 
thinking that in a more generic usage, one might want to use overlays for 
monsters (I'm thinking more for auras and not armor/equipment), so probably good 
to make sure a solution is chosen that works for everything, not just players.


More information about the crossfire mailing list