Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Objects not displaying in Staggered Isometric #395

Closed
RDeluxe opened this Issue · 8 comments

3 participants

Pierrick Bignet Thorbjørn Lindeijer Godefroy
Pierrick Bignet

Hi,

Got a problem with the new Staggered Isometric. After creating an object layer and putting objects (via tiles), objects are not visible. They are correctly created, but are not displayed.
The only thing you can see while selecting them is a tiny black vertical bar (left of the picture).

screen

Thorbjørn Lindeijer
Owner

Right, I didn't get around yet to do a proper solution for objects on this type of maps. In the change log I had noted "Added a staggered isometric map renderer, still without object layer support".

The tile coordinate system for staggered maps is a bit strange, so I'm not sure exactly how to deal with objects, which have their size and coordinates in tiles. Suggestions welcome.

Godefroy

If I'm not mistaken, with classic isometric maps, coordinates of objects are calculated like this :
coordinates

So this system doesn't apply to staggered maps. I think we can take a classic positionning system for these maps: top left corner as origin.

In addition, I think it would be interesting to be able to give tiles coordinates to an object (when an object should have exactly the position of a tile, not an arbitrary position).

Pierrick Bignet

I guess that something like this could work : http://fivedots.coe.psu.ac.th/~ad/jg/ch064/ch6-4.pdf

Thorbjørn Lindeijer
Owner

@RDeluxe That part is already implemented. The open questions are how to deal with object sizes and how to deal with sub-tile positions, as well as how to render the different types of objects for this type of map.

Pierrick Bignet

We actually have this problem with tiled. We plan to implement chests and other activable items as objects in Tiled. A way to center them on a tile would be nice, as a lot of objects are about the same size.

I use mainly objects from tileset, for the moment, that's why I see this solution as convenient. I totally get that it won't work for other kind of objects (shapes).

Pierrick Bignet

@bjorn I'll have to check the code, but I don't really get the problem here. Does the sub-tile position have any link to the global tile position ?
Isn't the method you use for isometric maps compatible with this one ?

Thorbjørn Lindeijer
Owner

@RDeluxe If you don't need sub-tile positioning you may be fine with the current tile <-> pixel conversion functions. In that case you'd only need to provide implementations for StaggeredRenderer::boundingRect and StaggeredRenderer::drawMapObject. Should be easy if you're only interested in supporting tile objects, you can use the IsometricRenderer as an example of course.

Thorbjørn Lindeijer
Owner

Support for object layers on staggered maps was implemented with pull request #638.

Thorbjørn Lindeijer bjorn closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.