ritual.sh/content/blog/tiddler-dev-blog-3-tools-for-tiled/index.md
2026-02-19 09:49:00 +00:00

3.5 KiB

title date tags draft
Tiddler Dev Blog #3 - Tools for Tiled 2026-02-19T09:13:42Z
tiddler
tiled
gamedev
false

I'd not really had any experience with Tiled but when I found out about it, it seemed like a great choice for having quick and transferrable map editing that I could then apply into Godot.

As I started building out the maps for Tiddler I found myself wanting to scatter a lot of decorative objects around - rocks, plants, props, ground variation - the kind of thing that makes a map feel lived-in. Doing this one tile at a time is fine for a few objects but becomes genuinely tedious at scale. What I wanted was a way to say "pick something random from this pool and put it here" without any effort.

{{< img src="foliage.png" alt="An example of the dense foliage I wanted to be able to place quickly" >}}

The Built-in Approach: Terrains

Tiled does have something for this. The terrain system lets you define sets of tiles that should be randomly chosen and blended together based on their neighbours. It's a proper solution to the broader problem of placing varied tiles across a layer.

You have to define terrain sets, assign corner and edge types to every tile variant in the set, and configure how they transition. For the use case of "I have six rock tiles and I want to click to drop a random one" this is considerably more work than the problem warrants. The terrain system earns its complexity when you're doing auto-tiling and transitions but for simple random decoration it seemed like overkill, and far more effort than I was willing to put in.

I looked around for a simpler plugin that just did what I needed and couldn't find one that was simple enough, so I quickly wrote two.

Two Plugins

Both plugins are available on GitHub at unbolt/tiled-plugins. They use Tiled's built-in JavaScript scripting API and show up as tools in the toolbar once installed.

{{< img src="ui_buttons.png" alt="The two plugin tools in the Tiled toolbar" >}}

Random Tile Placer

The workflow should be as simple as it sounds: select one or more tiles from your tileset panel, switch to the Random Tile Placer tool, and click on a tile layer. Each click places a randomly chosen tile from your selection.

{{< img src="selecting_tiles.png" alt="Selecting a pool of tiles in the tileset panel" >}}

{{< video src="drawing_random_tiles.webm" caption="Placing random tiles across a layer" >}}

Random Object Placer

The object placer works the same way but targets object layers instead of tile layers, placing each tile as a map object. It also adds a 50% chance to flip the placed object horizontally, which does a surprising amount of work in making a field of repeated props look less mechanical. The tool is also bound to R for quick access.

{{< video src="selecting_objects.webm" caption="Selecting the object pool" >}}

{{< video src="drawing_random_objects.webm" caption="Placing random objects with variation" >}}

Both tools have made populating maps dramatically faster. Dropping in a scattering of rocks and plants that would have taken tedious manual placement now takes a few seconds. If you're using Tiled and want something similar, the plugins are on GitHub — installation is just copying the .js files to your Tiled plugins directory.