It never renders in the editor or in game, LDtk actually works, but tile masks doesn’t work for it. Because it’s exporting to TMJ instead of JSON, even if I change file extension it still has tmj coding.
Related screenshots
As you can see, I’m on the right thing. But it only allows me to save a tmj, But I need a JSON for collision mask.
I wish the Collision masks worked for LDtk since it’s much simpler.
Generally, LDtk operates in a more flexible/diy way: you can define int grid & entities layers that you can interpret as you wish in your game code.
The structure of the LDtk files is well documented, and you can also just open the file in a text editor to see how the variables are structured. You can use the “Load JSON resource to variable” extension action to load the LDtk file, and then use for example an int grid for collisions.
In your events, you can then do the collision detection by mapping the position of the player to the position on the grid, getting the value in the int grid, and handling collisions appropriately from there.
That can be a bit annoying though, alternatively you can create a collider object and, at the start of the scene, load the tilemap, loop over the int grid with for each child variable, and create a collider object at each grid position that’s got the collider placed in the int grid. It’s much worse for performance/ram usage, but it’ll be much more intuitive to work with when it’s mapped to real objects on the scene.