Collision Friendly Tilemap Creation Process

A step by step guide to the collisions and masks in Tiled and GDevelop would be really great for noobs like me!

Hello!

This currently exists fully in the documentation site: Tilemap - GDevelop documentation

The Tiled section here is the step by step process. I just reconfirmed it works by only using the process only as described in the wiki rather than going off memory.

i am having collision issues, despite using tiles which i have already set the collision. But they simply dont work! Can you help me?

i am having lots of problems, they player can’t move beyond a certain tile, most tile collisions aren’t working, i used the collisions in the tile set itself hoping the collisions would be replicated in the other tiles well. What am I doing wrong?

Unfortunately, I can’t offer any guidance here. As mentioned above, I went and created a new map and tileset following the steps in the documentation, including creating collisions.

I was able to move without issue.

I’d recommend downloading one of the example projects with tilemaps and collisions (either Not-a-Vania or “Platformer with Tilemap”), and testing their maps in your project. If they work, then unfortunately somewhere in your process you’re not creating the collisions as expected by the engine.

If they don’t work, then somewhere in your behaviors (or events) are acting odd. Make sure you don’t have a tilemap collision object and then also add multiple platform behaviors to it, or something. (Each platform type (Jump through, ladder, platform) must be a separate object with a separate behavior.)

Though technically this is a Tiled issue but as it also pertains to GDevelop as how the engines interprets the Tiled data, i have some questions that i think that others will too benefit from. Firstly, how does the following tile data affects collision masks:

Basically i want to block certain tiles while giving free movement over other tiles. I have read about hitboxes, collision masks, pathfinding, but the overall information is not consolidated in one space. What is the role of the name and class properties in this respect?

I think i got it. The steps are as follows:

Create your map in tiled embedding the tileset in the map JSON.

Edit the tilesets adding collision objects and specifying different classes for different object groups, then export the tilesets.

Import the two JSON files and the png tileset as a tilemap in gdevelop.

Then, create Tilemap masks for each type of object you defined in the class property. In gdevelop use the filter parameter where you specify the class name you provided to the tiles in gdevelop.

Drag the masks to the game screen aligning it properly with the tilemap.

Finally, use the collision condition and the separate objects action!

Voila! Your collisions should now work