mapeditor / mapeditor/tiled

Terrain Shape Fill Tool

Open
#3,047 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

Tiled currently provides no easy way to fill a large area with a Terrain.

In Unity, when using autotiles (essentially Terrains), there is a rectangle tool that lets you draw rectangles with your chosen terrain, as shown in this tutorial video: https://www.youtube.com/watch?v=nfjAznD_MaU&t=404s

Tiled already has the Shape Fill Tool which allows filling a shape with your current stamp. I would like to see a version of that tool that fills the shape with your selected Terrain instead. If a whole separate tool isn't desirable (there are already a lot of tools!), then perhaps it could exist as different modes on the Terrain Brush tool, changing the tool's behaviour when dragged. The modes could be Brush (current/default behaviour) / Rectangle / Ellipse.

An example of some shapes that could be drawn this way, along with the shapes that would create them:
image
(Edit: whoops looks like that exact ellipse isn't actually possible with Tiled's ellipse-drawing algorithm, but close enough!)

In addition to speed, an added benefit of this feature is that it can be used to draw large shapes with incomplete Terrains that are currently a big hassle in Tiled. For example, it's common for tilesets to contain terrains with only convex corners, but to build up a large convex shape often requires an intermediate with concave corners, which trips Tiled up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Shape Fill Tool and Terrain Brush tool behavior described in the issue, then compare the requested Rectangle and Ellipse modes with Tiled's current shape-drawing behavior. Done means a selected Terrain can fill the requested shapes, including large or incomplete terrains, without disrupting the existing brush behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.