Sunday, September 6, 2026
spot_img

Tiled top degree collision


I’ve created the beneath tilemap in tiled and I’m questioning a couple of good strategy to “separate” these two totally different heights within the map. I wish to preserve it tile primarily based, so including a object layer for collision detection is a no for me.

Tiled top degree collision

I would love the participant to maneuver from the low floor to excessive floor utilizing the ladder. However as you possibly can see, two walkable tiled adjoining to one another shouldn’t be “related” since they’re on totally different heights.

Since I can solely add properties to the tile within the sheet and never on the map itself afaik, I can not mark the heights on my map. So I suppose I’ve to work with totally different layers for every top. Test if the layer the participant at the moment on has a tile or one thing, if that’s even attainable.

The explanation I don’t need to use a object layer is easy. My creatures transfer from tile to tile and I simply need to examine if that tile is walkable and on the identical top degree. No want to check vs a rectangle or polygonal object.

What I’m truly searching for is having properties per coordinate. This may make it so much simpler (pseudo code):

tileMap[x][y].floorCount;
tileMap[x][y].walkable;

as an alternative of:

map.getLayer(participant.currentLayer).layerMap[x][y].tileExists;
map.getLayer(participant.currentLayer).layerMap[x][y].walkable;

I merely can not add properties to a “international” tile (tiled appears to solely permit me so as to add properties to the tile on the sheet which is carried over to each utilization of it. This picture makes use of that very same nook tile as within the above picture, solely this time the participant is allowed to cross it, or maybe jump over it.

enter image description here

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles