Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Import TileMaps from Tiled Map Editor (http://mapeditor.org). This imports each map as Godot scene which can be instanced or inherited.If you like this plugin, consider buying me a (maybe monthly) beer on https://liberapay.com/vnenNew on 1.6* Fix a bunch of long-standing bugs.* Tile properties can inserted into TileSet metadata.* A few changes to make the imported scene closer to Tiled display.New on 1.5* Fix a bug that caused infinite loops on some maps.New on 1.4:* Navigation polygon now is set correctly.* TileSets with non-sequential IDs are supported.* Fix issue with absolute paths in the TMX.* Now it allows tile images with unmatched sizes.New on 1.3:* Detect polygons to select if it's convex or concave.* Sort polygons' vertices to ensure they are in the order Godot expects.* Support for post-import script.* Fixed bug that failed to import polygonal collision shapes.* Fixed bug that caused infinite loop when the re-import errored.New on 1.2:* Support for image and object layers.* Custom properties now become metadata.New on 1.1:* Support for isometric maps.* Custom TileSet image flags.* A few bug fixes.Features:* Accept both .json and .tmx formats.* Import TileSets and Images as separate or embedded resources.* Import collision, navigation and occluder shapes (if the objects are of the given type).* A few options to tweak the import.
Tiled Map Importer
This is a plugin for Godot Engine to import
TileMap
s and TileSet
s from the Tiled Map Editor.
Installation
Simply download it from Godot Asset Library: https://godotengine.org/asset-library/asset/25.
Alternatively, download or clone this repository and copy the contents of the
addons
folder to your own project's addons
folder.
Then enable the plugin on the Project Settings.
Features
- Import Tiled file as a Godot scene. Each layer in Tiled is a TileMap in Godot.
- Both
.tmx
(XML) and.json
formats. - Support for Base64 encoded map.
- Orthogonal and isometric maps.
- Import visibility and opacity from layers.
- Import collision/occluder/navigation shapes (based on Tiled object type).
- Custom import options, such as whether to embed the resources into the scene.
- Support for image layers
- Support for object layers, which are imported as StaticBody2D or LightOccluder2D
for shapes (depending on the
type
property) and as Sprite for tiles. - Custom properties for maps, layers, tilesets, and objects are imported as metadata.
- Support for post-import script.
Usage
- In Godot, click on menu Import -> TileMap from Tiled Editor.
- Set the source Tiled file (either a
.json
or a.tmx
). - Set the target destination scene.
- Ajusted the desired options.
- Press ok.
If no error occurs, the generated scene will be stored where you set it. The TileSets will be on a relative folder or embedded, depending on the options.
Caveats on Tiled maps
Godot TileSets only have on collision shape, so the last found will overwrite the others.
The same goes for navigation/occluder polygons.
There's no Ellipse shape in Godot. If you use it as a collision object, it will be converted to a capsule shape, which may be imprecise. However, if the Tiled ellipse is a perfect circle, a CircleShape2D will be used instead.
Set the type of the object to
navigation
oroccluder
to use it as such.Objects in object layer cannot be set as
navigation
.Only polygons can be used as occluder/navigation. For those, you can make a polygon or polyline in Tiled. Rectangles will be converted to polygons, but ellipses are not accepted.
Occluder shapes are set as closed if a polygon is used and as open if it is a polyline.
Godot has no decompression function (yet). So don't save the Tiled Map with any compressed format. "Base64 (uncompressed)" is also valid. You'll receive an error message if compressed data is detected.
Options
Post-import script
The selected script will have it's post_import(scene)
method run. This
enables you to change the generated scene automatically upon each reimport.
The post_import
method will receive the built scene and must return the
changed scene.
Single TileSet
Save all Tiled tilesets a single Godot resource. If any of your layers uses more than one tileset image, this is required otherwise it won't be generated properly.
Embed resources
Save all TileSets and images embedded in the target scene. Otherwise they will be saved individually in the selected relative folder.
Relative resource path
The relative path from the target scene where to save the resources (images and tilesets).
Image flags
The image flags to apply to all imported TileSet images.
Create separate image directories
When the TileSet is a collection of images, this option tells tp create a new directory with the TileSet name to hold all of the images.
Custom properties
Whether or not to save the custom properties as metadata in the nodes and resources.
License
MIT License. Copyright (c) 2016 George Marques.
Import TileMaps from Tiled Map Editor (http://mapeditor.org). This imports each map as Godot scene which can be instanced or inherited.
If you like this plugin, consider buying me a (maybe monthly) beer on https://liberapay.com/vnen
New on 1.6
* Fix a bunch of long-standing bugs.
* Tile properties can inserted into TileSet metadata.
* A few changes to make the imported scene closer to Tiled display.
New on 1.5
* Fix a bug that caused infinite loops on some maps.
New on 1.4:
* Navigation polygon now is set correctly.
* TileSets with non-sequential IDs are supported.
* Fix issue with absolute paths in the TMX.
* Now it allows tile images with unmatched sizes.
New on 1.3:
* Detect polygons to select if it's convex or concave.
* Sort polygons' vertices to ensure they are in the order Godot expects.
* Support for post-import script.
* Fixed bug that failed to import polygonal collision shapes.
* Fixed bug that caused infinite loop when the re-import errored.
New on 1.2:
* Support for image and object layers.
* Custom properties now become metadata.
New on 1.1:
* Support for isometric maps.
* Custom TileSet image flags.
* A few bug fixes.
Features:
* Accept both .json and .tmx formats.
* Import TileSets and Images as separate or embedded resources.
* Import collision, navigation and occluder shapes (if the objects are of the given type).
* A few options to tweak the import.
Reviews
Quick Information
Import TileMaps from Tiled Map Editor (http://mapeditor.org). This imports each map as Godot scene which can be instanced or inherited.If you like this plugin, consider buying me a (maybe monthly) beer on https://liberapay.com/vnenNew on 1.6* Fix a bunch of long-standing bugs.* Tile properties can inserted into TileSet metadata.* A few changes to make the imported scene closer to Tiled display.New on 1.5* Fix a bug that caused infinite loops on some maps.New on 1.4:* Navigation polygon now is set correctly.* TileSets with non-sequential IDs are supported.* Fix issue with absolute paths in the TMX.* Now it allows tile images with unmatched sizes.New on 1.3:* Detect polygons to select if it's convex or concave.* Sort polygons' vertices to ensure they are in the order Godot expects.* Support for post-import script.* Fixed bug that failed to import polygonal collision shapes.* Fixed bug that caused infinite loop when the re-import errored.New on 1.2:* Support for image and object layers.* Custom properties now become metadata.New on 1.1:* Support for isometric maps.* Custom TileSet image flags.* A few bug fixes.Features:* Accept both .json and .tmx formats.* Import TileSets and Images as separate or embedded resources.* Import collision, navigation and occluder shapes (if the objects are of the given type).* A few options to tweak the import.