Posted June 25, 2022 by Thorbjørn Lindeijer
#Release
This release comes with major improvements to Automapping, custom dialogs in scripts, a simplified project setup and a unified custom type system, among many other improvements!
Automapping, or pattern-based tile placement, was originally introduced in Tiled 0.6 to simplify editing of maps for The Mana World. In this release the algorithm has been almost entirely rewritten, making it much faster, easier to set up and adding several new options.
(a demonstration of AutoMapping by eishiya, where tile variations are chosen based on a “light” layer)
As a result of optimizations and taking advantage of multi-core CPUs, applying Automapping rules is now 10-30x faster and generally no longer causes noticeable delays. In addition, the “AutoMap While Drawing” option no longer creates separate undo steps, instead seamlessly integrating any changes with the paint operation.
To apply a certain set of rules only to some of your maps, you can now use filename filters in the rules.txt
file.
The input and output region of each rule are now automatically determined. To still enable the matching of “empty tile” or “non-empty tile” and other special cases, a built-in “Automapping Rules Tileset” was introduced, which can be added to your rules map from the Map menu. This tileset currently provides the following special tiles:
From left to right, these are Empty, Ignore, NonEmpty, Other and Negate. It is also possible to set up your own tiles for these special cases.
A number of per-rule options can be set by placing a rectangle object on a “rule_options” layer that covers all the rules the options should apply to.
Any custom map, layer and object properties supported by Automapping are now displayed in the Properties view when it detects that the current map is an Automapping Rules map (the map needs to have at least one “input*” and one “output*” layer).
Thanks to @dogboydog, scripted extensions can now build their own custom dialogs. This can greatly simplify the configuration of extensions, which previously might have relied on multiple prompts or reading custom properties.
Talking about scripts, it is now possible to trigger a script from the command-line using the new --evaluate <file>
argument.
The project-related actions were simplified, with File > New > New Project replacing the Project > Save Project As action, and the “Recent Projects” and “Close Project” actions moving to the File menu as well.
In addition, all project-related settings are now only available after creating or loading a project.
Object Types have been merged into the Property Types, now simply called “Custom Types”. This means custom classes can now have a color and can be used as “object type”. If your project refers to an object types file, these types will be automatically imported as custom classes. If you used globally stored object types before, they can be manually imported to your project.
In addition, the “Type” property previously available only for objects and tiles is now available for all data types as the new “Class” property. For consistency, this value is written out as “class” also for objects and tiles, but a project-wide compatibility option is provided to make it still write out as “type”:
The size at which all tiles in a tileset render can now be configured to be either the tile size (as before) or the map grid size. The latter is useful if you want to use tiles with a different resolution but scale them up or down to fit the grid.
When a tile is not rendered at its native size, it used to always get stretched. A new “Fill Mode” option was added to the tileset that can be either “Stretch” or “Preserve Aspect Ratio”.
As a first step towards supporting sprite atlasses, the images in an Image Collection tileset can now refer to a sub-rectangle of their image. This sub-rectangle can be changed in the Tile Properties, or by scripts through the Tile.imageRect
property.
Many other small improvements could not be mentioned, so check out the full changelog below.
In contrast to the Tiled 1.9 Release Candidate, these builds are once again based on Qt 5.15. There is still an additional compatibility release for macOS 10.12, built against Qt 5.12.
This new release was made possible by almost 300 patrons and sponsors supporting me on a monthly basis as well as many people choosing to pay for Tiled on itch.io and some who donated through Liberapay.
Your donations enable me to work full-time on Tiled! If you’re not donating yet, please consider setting up a small monthly donation to keep this sustainable. Let’s make this tool even better!