Tilesource collision groups unusually slow

When assigning tiles to a collision group in a not-ridiculously-large tilesource (32x32 tiles at 32x32 pixels each), the editor seems to take several seconds to do so, freezing up the entire time. This seems unusual given the very fast behaviour for other similar processes in the editor. Is there any particular reason (or bypass?) for this?

Of course, manually editing the .tilesource file is always an option (in some cases, this is even faster!), but this seems a bit silly.

You can use Tiled to edit and export tilemaps for Defold. Regardless of the speed issue it’s what I’d recommend for series project as it has so many more useful features.

I’m not sure of the issue with the editor but maybe sharing your project with the Defold team (@britzl or @Mathias_Westerdahl ) would help find the problem and fix it.

1 Like

Does Tiled include support for assigning tiles to collision groups?
My problem does not seem specific to any given project – it seems to happen with any sufficiently large tilesource.

Sorry, I got confused between tilesource and tilemap.

If you can it would still be helpful to send a sample in where it happens along with your computer hardware / OS info.

1 Like

Welcome back @carlfredriknybergbro!

How large is the tilesource?

1 Like

32x32 tiles, 1024x1024 texels (see OP)

1 Like

Thank you!
As @Mathias_Westerdahl points out, it’s 32x32 tiles, each one at 32x32 pixels. So not unreasonably large, I’d figure.

Also, for comparison, when constructing a tilemap from the tilesource, it’s very quick to load and selection of the tiles is immediate.

@carlfredriknybergbro would you mind sharing the tilesource you are using? (You can send it to bjorn@defold.se or share it here)

1 Like

I faced the same issue on the latest stable versions of Defold (did not check on previous ones) . In my project, it takes a long time to initialize the images of tile sources, and assigning a collision of a tile to a group takes 3-5 seconds. I don’t see such problems with atlases. My computer has up-to-date hardware, on which Defold already had problems with Nvidia drivers earlier. This time, changing the parameters did not help. Here is an example of a tile source: yandex disk

Thank you for sharing an example tilesource!

The tilesource is pretty big with 55x24 (total 1320) 48x48px tiles. BUT it should not be that slow to make a change. I will make some investigations and update in this thread.

1 Like

The GitHub issue: https://github.com/defold/defold/issues/5919

Thanks for the quick response! I will add that the same lags occur with any changes in the parameters of the tile source components. For example, assigning the start and end of an animation. IMHO lags when assigning collisions is just a special case of this general problem.

1 Like