Multi layer stamps

Hi there,

I’m working on a top-down-RPG-like game again and I’m using Tiled to create the maps for it.
The game engine (MelonJS), which I’m using supports Tiled .tmx maps out of the box with all it’s features.

Imagine, that I’ve got about five layers for creating the map (sometimes 6 or 7 layer depending on what I want to do):

  • ground (tile layer)
  • objects lower (tile layer)
  • game objects (object layer)
  • objects upper (tile layer)
  • collision (object layer)

The “ground” is grass/desert/snow, paths, streets and so on.
“Objects lower”/“Objects upper” descripes some objects created with tilesets for decorating the scene. The lower part of the objects are collidable by the lower part of the player (which is 1,5 times larger than the tiles) so the head of the player is rendered “over” the “objects lower”.
The upper part is for example the top of a tree or the rooftop of a house, which the player can walk behind.
That’s why the “game objects” layer is between these two tile layers.

Now I have to draw a tree or a house in two steps: the lower part on the “objects lower” layer and the upper part on the “objects upper” layer. Sometimes, some mapping errors appear, because I didn’t checked, on which layer I’m currently working.

So for this case, it would be really helpful, time saving and error preventive to have such kind of multilayer stamps, where I can define the lower part to be drawn on layer “x” and the upper part drawn on layer “y”. Maybe it could be much more flexible over more than two layers.
Certainly these stamps must be defined for each single map, because they bound to the layers in the map.

What do you think?

Best regards,

I think that it would be much more flexible if they were a stack, but weren’t bound to a layer. The bottom layer in the stamp could be drawn on the layer currently selected, the next layer (which might be empty) on the layer above, and so on. As long as your layers were ordered consistently, this would mean that the stamps wouldn’t have to be defined for each single map.

Otherwise, I think it is a good idea, but a lot of work would be needed to figure out a UI for it that is clear.