[crossfire] server commit for map2 support.
Mark Wedel
mwedel at sonic.net
Sun May 21 00:12:50 CDT 2006
Andrew Fuchs wrote:
> I would like to ask a few questions in terms of making maps and archetypes.
>
> There are currently archetypes for chandeliers, would it require more
> code to make these appear above players?
For chandeliers, if fly is set on them, they will appear above players, as the
fly layer is above the player/monster layer.
> Same for elevated parts of
> towers, and the back of some buildings.
If the object does not have merged images (is still 2 or 4 or whatever
separate images), then the fly trick would work for those. But then, I'm not
sure if the player would be able enter them, and when the player is on a space,
they would appear above the player in the look window.
With a little work, it would be possible to add something like 'layer ...' to
objects which denote which layer they should be drawn on, but not affect the
actual layer in terms of the look window.
For combined images, this doesn't work, as the layer that that image appears
on is only sent once for the head.
The draw logic could be changed to make it work, but then it would draw all
big images the same way. So while tall towers should be drawn in front (on top)
of the player, that probably isn't the right thing to do for things like the
coliseum (the change in draw logic would basically be draw all objects on space
x,y, then all objects on x+1,y ... and for big images, you do the draw once at
the head location, so it then obscures stuff behind it).
The only way I can really see for fixing that is to add some object attribute
to denote the 'rear' portion of the object should be drawn at a higher layer.
But that starts to make things messier on the client side (do you resolve that
layer at draw time?). Plus, this doesn't work as well for the opengl which
draws the entire big image at one time and not pieces (but that could be
changed). And then you start to get the issue of what about a 3x4 image. Does
it only obscure the player for the top half? The top 3 rows? Can a universal
flag cover those?
The other possibility is to send the image for every space it appears on and
not send only the head, but do send an offset (eg, here is a shop, but the head
is +1,+1 from this space). This uses more bandwidth, but then would allow the
layer to be specified for each part, so proper drawing could be done.
IIRC, the practice of merging layers was never really to save bandwidth.
Instead, there was the annoying factor of when drawing images, you'd need to
split them apart before, and then potentially merge them for future edits, etc.
I think some was also related to isomorphic crossfire (becoming daimonin) -
merged images could be drawn correctly in isomorphic mode, but split images
appeared, well, split apart.
>
> Second, what are the chances of some sort of vertical tiling being
> introduced? (even though this is unlikely)
I take this to mean the idea of different stories of a building?
this is doable, but has some issues. The simple case to visualize is say a
fort - you have an outside wall, and an inner courtyard. On the ground floor
along the wall, you have various rooms. On the second floor, you can walk along
the walls on top of the roof of these rooms.
It is pretty clear that if you are along the wall (on the roofs), you could
see people in the courtyard. If they walk off the roofs, they would fall into
the courtyard.
But for the person in the courtyard, it is probably proper for them to see the
rooms on that same layer, and not the walls/roofs.
One issue is what happens if someone on the roofs fire down to those people in
the courtyard? This should be allowed, but to those in the courtyard, it
appears that arrows (or spells) are basically show up from nowhere. People in
the courtyard can't really return fire, etc.
One fix would be to add some command like 'look up', which changes the player
view from the level they are on to the level above them. But if there are 5
layers, that isn't a really good solution (fly/levitate should be a way to
change layers also).
Also, ideally, line of sight would need to be changed. If for example the
roof are 8 tiles wide, and the player is farthest from the courtyard, then 8
spaces of the courtyard nearest to the player shouldn't really be visible (being
obscured by the wall/roof). But that is tricky - a person standing up would be
more visible than a dagger laying on the ground.
All that said, codewise, I don't think this is really hard. But there are
these other issues.
More information about the crossfire
mailing list