About Tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ismaelgame7
:warning: Old Version Published before Godot 3 was released.

Hello,

I was wondering when are you going to improve Godot’s Tilesets system?
And also wanted to know if there will be any change on this in godot 3.0?
I know you’re busy with more important things, but it would be nice to have a more native and better way to create maps.
I use Tiled to create maps and export to Godot with a plugin, however to make collisions in Tiled is a drug!
And every time I change something map, in godot the map reload plus delete the other nodes that were in the scene :confused:

So… can anyone say anything about it?

Try reporting the issue to the plugin creator.

eons | 2017-08-24 20:01

The problem with imported scenes in general is that if you modify them directly in Godot, there is a risk that you loose your changes because you did modify the actual map, so of course, reimporting the map completely overwrites it with the updated data from tiled. This is partly how it works with the 3D scene importer in Godot 3.0, although there are more options. There is no way to make the importer “just touch what it needs to”, that’s not its job, that’s the job of the scene system:

One workaround is to use scene inheritance: make a new scene that inherits your imported scene, so changes made in the base scene will reflect in the other one, even if the base gets completely rewritten (but that won’t prevent data loss if you do breaking changes, like removing a node that was required in inheritance. For example, having node A in the base scene from tiled, and in the other scene you add B as child of A. If A gets removed from the base, you will loose the link in the other scene, and it’s possible B gets deleted. Never tried inheritance yet, though^^").

Another workaround is to use scene composition: add your imported scene as instance in another scene, without touching the nodes in it. This way, if you re-import the map, it will simply update in scenes where you use it. It sounds less flexible, but is safer and easy to grasp.

Zylann | 2017-08-26 02:03

:bust_in_silhouette: Reply From: quijipixel

I know what you are going through now, so the advice that I can give you is to make a Godot script to prepare your imported scenes everytime they are being updated.That might seem like a pain at first, but once its working you can have a fluid workflow. I did that modifying some things from the Tiled plugin, I even did the same thing to the Aseprite plugin too.

It should be tricky to do this for the Tiledmap plugin. :confused:

ismaelgame7 | 2017-08-26 00:42

:bust_in_silhouette: Reply From: ismaelgame7

Godot has potential, has everything to make sure succeed but unfortunately has some displease things like the part of TilesMap.
I just hope that in the next versions the people improve the Tilemap part of godot, I do not want to stay depends on the plugins and a lot of people do not either.