A downloadable tool for Windows, macOS, and Linux

Download NowName your own price

TilePipe2

is the second iteration of the TilePipe project. The original TilePipe can be downloaded from here https://aleksandrbazhin.itch.io/tilepipe.

About

Most game engines supporting 2D tilemaps also support autotiling - substituting a tile variant depending on it's neighbors. That way a level designer is able to paint a terrain with a tile like with a brush while the proper tile variants are chosen automatically. To create such an autotile an artist has to copy and paste one tile multiple times to create all possible tile variations.


Generally you need a texture like this to do it:



Tipepipe is meant to help an artist creating a 2D autotiling tileset by automating the copying routine. Instead of 47 or 255 tiles one has to draw only a couple of parts (like center, sides and corners) and have everything else generated. 

Tilepipe can

- copy the parts to create all needed tile variants

- generate neighbor bitmasks that define each tile variant usage

- generate collisions considering non-transparent parts solid

The latter 2 are  important  if you export to a game engine,  since it's also a lot of work.

How it works

TilePipe2 takes an input texture, breaks it into parts


Applies some rules to combine them, each looks like this:


And places the result in a grid as defined by the template


To get the result ready for autotiling


All three input parts are modifiable by user. But rulesets and templates are mostly covered by the examples, you need only to draw some parts.

How the parts are combined can be set up through the UI.

  • How much pixels should sides overlap the center (merge and overlap sliders)
  • Randomization fine tuning
  • Resizing
  • Filtering (smoothing)

Tilepipe is an opensource project using the Godot engine, code: https://github.com/aleksandrbazhin/TilePipe.

If you want to report a bug or propose a feature - open an issue. Previous versions can be found in https://github.com/aleksandrbazhin/TilePipe/releases

Tutorial materials

Awesome video from one of the TilePipe2 early users. 

Links

Github - https://github.com/aleksandrbazhin/TilePipe.

Discord - https://discord.gg/B4VBVYG

 Reddit community - https://www.reddit.com/r/TilePipe/

Documentation

Motivation behind the project

There are several projects that address this issue, namely LDtk (opensource) and TileSetter (proprietary). Both include a tilemap editor.

With this project I was trying to implement the most straightforward approach to generating autotiles, leaving the tilemap editing to be done in the game engine of the user's choice. At the time of writing the project supports only plain texture or Godot3.x tileset format export. But other exporters are planned, namely for the Tiled level editor.

An important part of the project is being open, so the creators can rely on it in the long run safely and invest their time into learning it and setting up their own templates and rulesets.

Terms

- Tile. A specific type of terrain. It is something you can draw your map with. It can have multiple variants which are selected depending on tile's neighbors.

- Subtile. Is one tile variant, which is used in a specific neighbor configuration. Variants differ since the tile on the edge of a terrain zone looks different from the inner tiles.

- Tileset. A collection of tiles used in the game engine or level editor. Some tiles can be "autotiles", some can be plain ones.

- Input texture. A drawing consisting of all the parts that are used in the tile. What parts you need to draw depends on what ruleset you use. As of release of TilePipe2.0 version all the parts need to be placed in a row. You can have some of them randomly subsitiuted to have some variety, for this you need to place parts below each other in a column.

- Tile part.  A part which is to be combined to create each subtile. First part in input texture is always the tile center. How many parts you need for the sides and corners depends on what ruleset you use. Each subtile always consists of 9 parts: center and 8 side and corner parts which are placed on top of it.

- Neighbor bitmask. In the template tab you can see the numbers over each subtile. These are bitmasks of the 8 neighboring tile of the same type. They are counted from the top clockwise, if there is a neighbor we have a 1 in binary representation of that number, otherwise we have zero. So they differ from zero (0000 0000) for a subtile with no neighbors to 255 (1111 1111) for a tile fully surrounded by the same terrain.

- Ruleset. Rulesets are sets of rules dictating which parts should be used in which order to create a specific subtile. They are a JSON files, which are then visualized in a separate tab in TilePipe. You can change them in any text editor ot create any kind of rules. Some of the rulesets in the examples are the most useful, so just copy them to the rulesets/ subfolder of your project. There is a JSON schema, specifying the format and autochecker script, you can find both in the github repository in utils/.

- Rule. Each rule defines what input parts are used at which position of a generated subtile, should it be rotated or flipped on x or y axis.

- Template. Templates are png images, but only those placed in the templates/ subfolder of your project will be discovered. They consist of 32x32px squares, each of which is divided into 9 smaller squares. Each of those nine represent a tile's neighbor, which will affect the selection of the subtile. The smaller squares can be either white or transparent (no neighbor of the same tile) or of any other color (there is a neighbor). The central square represents the tile itself and if it's white, no subtile will be rendered at all. These template images are then recognized by TilePipe and the result is composed by this templates. The format could as well be text or JSON based, but images are easier to manipulate for an artist.

Using the terms:

TilePipe2 just generates all the subtiles needed for creating an autotile from the tile parts provided in the input texture. The resulting subtiles are placed as defined in the template. For every bitmask defined in the template, this program first looks for a rule in the ruleset, then combines the input tile parts to generate a subtile for this specific bitmask.

First of all you need to draw the parts that are repeated in tiles. This is a drawing specific to the ruleset you use. For example, if you have a sideview game, your tiles may be symmetrical left to right but not symmetrical top to down. So you'll need different parts for top and down of tiles, but can use only one side. And sides must be flipped, but not rotated for such game. That's the ruleset named in the examples "8_part_side_symmetry", and there is also an input texture for it with an example tile setup.

You can also setup a template, which determines places for the tiles in the resulting tileset, but in most cases you are good with the default. If you still want to do it, just rearrange tiles in the example texture using any image editor.

User project logic (add/use)

First, any asset has to be added or copied into the project folder. You can do it yourself or with the help of the provided GUI. But the easiest way is to just start off with one of the examples. Copy the example folder and go from there (you can delete all the tiles, but keep the rulesets and templates).

TODO: GUI tour

GUI screenshot


Motivation behind the TilePipe2 rewrite over TilPipe

1. The project GUI logic became too complicated with no room to add new features.

2. Ability to save and use custom rulesets (previously named presets). These are now json files, schema is included in the project. There is a viewer in the GUI.

3. Project-like logic for every directory. Several tile sources now from a project, which can be exported at once.

4. Every data is now explicit, there is minimal built-in logic (not examples, not templates, not rulesets). It's a VCS-ready approach, all the changes are now trackable. Everything previously built-in os now distributed as the examples.


New in aplha 4

Now each tile can be exported as multiple textures - onr per subtile or one  per frame



Updated 25 days ago
StatusIn development
CategoryTool
PlatformsWindows, macOS, Linux
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
Authoraleksandrbazhin
Made withGodot
Tags2D, Tilemap, Tileset, tool, tools
Code licenseMIT License
Asset licenseCreative Commons Zero v1.0 Universal
Average sessionA few minutes
LanguagesEnglish
InputsKeyboard, Mouse

Download

Download NowName your own price

Click download now to get access to the following files:

tilepipe2-windows desktop.zip 15 MB
Version 2.0.alpha.7
tilepipe2-linux/x11.zip 16 MB
Version 2.0.alpha.7
tilepipe2-mac osx.zip 28 MB
Version 2.0.alpha.7

Development log

Comments

Log in with itch.io to leave a comment.

Help! When I try to create a tile and enter its name, manage rulesets or manage templates, the program crashes with no explanation. I have the latest itch version for Windows.

(2 edits)

Hi! I will look into it. Are there more details? Are you a new user? Do you have some tiles already? If you do, I’ll need those to reproduce the bug. What system are you running, Windows? You can try to clean your ui cache in User/AppData/Roaming/TilePipe2 - just delete the folder and the program should return to default examples folder on the next launch. If this does not help, then I guess something is wrong with one of the tile files, but the program should not crash either - that’s certainly a bug.

You would also help me greatly if you’d send the logs folder from User/AppData/Roaming/TilePipe2

How do I work with tiles smaller than 32 px if the image can't be smaller in either dimension? Do I have to add empty space? Why is there such a limitation in the first place?

I don’t think there is such a limitation. Most examples are 16x16px even. The templates are 32x32, but they only regulate where the resulting subtiles are located on the output image.

There is setting for input tile size and for output tile size if you want to resize the tiles. The output tiles will be scaled to the output tile size, if you “Output resize” in “On”.

i must've tried to add the texture as a template, my bad

(1 edit)

This is an amazing tool! I love all the options and flexibility. I’ve been recommending it to others frequently lately.

I wanted to let you know that I added TilePipe2’s built-in export formats to TileBitTools (https://github.com/dandeliondino/tile_bit_tools/ ) for Godot 4 — so Godot 4 users can use this tool more easily — and gave TilePipe2 its own tag in the plugin to search for them. Hope you don’t mind! 

I don’t know if you have plans to move to Godot 4 terrains, but, if you do, I’d love to see your take on generating multi-terrain transitions. I imagine it would be quite a lot of work to support, but I think all the features TilePipe2 already has would be perfect for generating those tiles.

Thanks!

I was planning on terrains export as it also transpires to Tiled export format, but generating all the transitions would be too much. My idea was to export multilayer tileset, as it looks much simpler.

Unfortunately, I did not have time to work on the project lately. I even can not bring myself up to create a somewhat detailed video tutorial on how to TilePipe2 is supposed to be used. As soon as my life stabilizes a bit, I will return to it all.

Wonderful tool, tried the first one, then this one, and it's really useful.

One request: An export that exports to a directory, with each tile as a separate file, named <projectname>-<bitmask>.png

Silly as it is, it would really help out people using LibGDXs TexturePacker, and, I imagine, other tools that might take TilePipe's output as input.

(+1)

Thanks.

I was thinking about implementing directory export, but for another reason (long planned Tiled export). I have it in the backlog. Will add your request too.

(+2)

Check out the Alpha 4 release, it should do what you requested.

This is an amazing tool and it's really helped me get my tilesets set up quickly and imported into Godot.  My only question is this: how do I prevent the randomization of combinations of the provided tile parts?  I have a project where I have four lines of parts, and they are outputting to my custom quadruple 47 template just fine, but they are randomized and I'd like them to stay with their respective rows.

In essence, I want all of row 1 to output to the first 47set in the template, all of row 2 in the second 47set, etc.  Is there a way to do this?

Thanks again!  Your work is so appreciated!

(2 edits)

Thanks!

Are you making an animated tile?

I was working on the problem you’ve mentioned in the light of animation. If I ever finish this work, there will be a switch randomization/animation, and the latter will work somewhat like you describe. However talking about Godot you don’t have to have everything on one texture, there is special AnimatedTexture resource type which works with tilesets too.

If you are going for animation, you can split your input into 4 parts and generate separate textures with a single 47-tile template. Export the first one as a Godot tile, then replace it’s texture with animated texture, created from 4 47-tile textures. It’s a bit of extra work, but it can work even now.

As for updating program, I don’t know when I will be able to get to work on it - maybe in a week, maybe in a month.