[crossfire] On item perspective and monster size

Mark Wedel mwedel at sonic.net
Mon May 29 03:10:07 CDT 2006


Nicolas Weeger (Laposte) wrote:
> Hello.
> 
> Unless I'm totally blind, current items's perspective is:
> * straight top-down view for ground, shop tiles, and such
> * top-down view with an angle, maybe around 30 or 45° (so the "bottom" is 
> closed for user than the "top"), for walls, monsters, buildings, and many 
> things
> * either top, with (books) or without perspective or side view for other items 
> (equipment, shields, ...)
> 
> If this isn't totally wrong, I think some monsters have a strange size. For 
> instance, a red dragon is 3 tiles horizontal and 2 vertical, for an east- or 
> west-looking pic. Accordingly, the north- or south-looking pic should be the 
> same 3x2 size (unless the code supports different pic sizes for different 
> directions, something I seriously doubt), and the monster will look quite 
> certainly squished.

  That's a tricky question.

  The server code, in terms of what spaces it believes the objects are on, can 
not switch between 2x3 and 3x2.

  However, with merged images, there isn't any requirement that all the images 
be the same size.  So different facings could be different sizes.

  However, for the dragon, that probably wouldn't be the right thing, as the 
player would find it hard to really know where the dragon is and is not.  I 
can't actually think of any cases where it would be appropriate for the image 
sizes to be radically different based on facing.

> So shouldn't the dragon (and many other monsters) be rather 3x3, or 2x3?

  The dragon (and things like wyverns) are an oddity, as just from what they 
look like, they certainly are not square.  I'm not sure what the fix for the 
wyvern would be - can't really make it 1x1, and I think making it 2x2 wouldn't 
look right either.

  The correct approach could in fact modify the server so a multipart creature 
could swap between 1x2 and 2x1.  But that is tricky, because a lot of the code 
looks at op->arch->clone.[xy] to know how the pieces go.

  One way that could perhaps be done is make two archetypes, one east/west, one 
north/south, with one being 1x2 and one 2x1.  Then the code that changes 
direction could change the op->arch to point to the right image.

  However, this would make the move code really complicated, as if the creature 
was in a narrow hall, there isn't space for it to turn north/south.  I think the 
move code would have to be modified to check both archs to see if it can fit by 
changing directions (this would be necessary for it to turn the turn in a narrow 
passage for example).  That isn't a minor change.

  That said, for humanoids (giants, titans, etc), they could be changed to have 
a square base (1x1, 2x2, etc) with the big image just extending above them.

  However, this will result in the case of a player potentially be obscured by 
the creature (a titan right now is 3x5 I think, but should be 3x3.  If you're 
attacking from the north, you'd be underneath/behind the 2 spaces that still 
extend upwards.  You could draw the player on top of the titan, but that would 
look pretty bizarre from a perspective side of things).







More information about the crossfire mailing list