As it is a very big multiplayer project, I just created a new Defold project with a few tiles but the same tilemap layout to reproduce it, but I didn’t had the issue.
I told myself the issue could only happen because of the tilemap… so I recreated the map from scratch on Tiled (I use it and then export maps to .tilemaps with the Tiled Defold plugin), and exported it again.
I no longer have the issue now. Maybe I messed up with tilesources or something, I don’t know…
Sorry for that !
EDIT: This is no longer relevant, I managed to reproduce the issue, please check the answer below.
Hey, I’m back and I managed to reproduce the issue!
It looks like to happen when the Tile Map is very large or the tile is widely used.
You can test it by loading the attached project. Right from starting the game, the character collides with a tile that it should not collide with.
If you just remove the blue tile from the blocker collision on the Tile Source, it’s not colliding anymore. (note: Moving the character is possible with the arrow keys.)
I had to modify a tutorial project to test it quicky, but it is enough to see the issue (I printed a message on collision): RPG map sample.zip (3.4 MB)
Yup, that does indeed look like a bug. Created DEF-3687 and added it to our sprint planning session today. I can’t promise that this will be included in the current sprint though.
Collisions incorrect when my tilemap exceeds approx. size 100x100.
Tilemap has (static) collision shape set to a tilesheet, where one of the tile types is not in the collision mask.
After increasing the size (say 150x150) a kinematic collision object starts colliding in tile regions
containing non-collision tiles.
Aside, what is Defold’s performance SLO for handling collisions with large tilemaps (i.e. any upper bound on tilemap size)?
Are there performance differences using multiple small tilemaps positioned adjacently, or using one large tilemap?
Try moving the white block around, falling down gaps, etc. Scene has gravity.
Brown tiles collide. Black tiles should not.
Initial load uses a smaller map with no collision issues.
Press ‘2’ to switch to a larger map. ‘1’ to switch back.
Sorry for the lack of communication! I think @jhonny.goransson took a quick look at it while he was investigating another tile map issue, not sure if it was related?