0 votes

Hi everyone,

i am new at godot but learned many in videos on favorite dev-youtubers since 3 Years.

I just in learn phase. My Favor is to Create an little RPG in Top-Down that look like the Game "Tibia", because this is my all time favorite Game :D

If you know Tibia, you maybe heared about "OpenTibia" which is basically the Custom-Server alternative (not sure if it legal). If you know how to Create a Server you maybe know how to map your Own Map. I know the Programm "RemereĀ“s Map Editor" and have some wishes for Godot, maybe you know how to get this technics in Godot.

One of my Questions is, how to select 2 Autotiles and connect them? In the Pictures you can see the Grass Autotile in the Remeres Map Editor. If i place them, without Water, it has this border. If i place Water next to the same tiles, it becomes this border. How i can technically do the same stuff in Godot, because it helps a LOT..

The next question, which probably has nothing to do with Godot, what is the style-name of Tibia and can I recreate it in Godot? (Picture 3)

And the FInal Question: How to tell Tilemap-Autotile what to do, if the bitmask NOT matches? As you can see in Picture 4 there a many table-rows above each other. In Godot the same will does not work with Autotile (3x3 (minimal)).

A lot of questions an i hope i get some Answers :D

Thank you for Reading
Daniel

Picture 1 & 2 ( Grass / Water)
Single Grass
Water Grass

Picture 3 (Tibia Looks with Layers)
enter image description here
enter image description here

Picture 4 (Tables)
Table

in Engine by (14 points)

1 Answer

0 votes

For autotile to work, Godot needs to know what areas of the tiles are supposed to share boundaries with identical tiles. "Bitmasking" is how Godot tracks that information. First, add a TileSet to a TileMap, then add some images to the TileSet. Click "+New Autotile" with the blue plus sign. Select the image you'd like to autotile on the left hand side of the TileSet editor pane (If you don't know what that is, it opens on the bottom of your screen where the output/debugger panes usually are when you select a TileSet in the TileMap editor object inspector pane). Then, you'll need to draw the tile region by clicking and dragging. By default, the TileSet expects your images to be 64px by 64px (I think), so you may need to change either your images or your TileSet/TileMap settings to make the tiles fill the entire square. You can also change how the TileSet pane "snaps" tiles/tile regions.

What's a "tile region"? Autotile actually depends on you selecting square-ish shaped regions of like tiles, ie "these are all grass with dirt border," "this other tile region is all ocean with a dirt border." Once you have a region selected, switch to the Bitmask option in the TileSet editor pane. Then, just highlight in red all the boundaries that tiles in that specific region share with each other by clicking on each tile-sub section.

I hope some of that is helpful. If not, there are lots of great YouTube videos that explain Godot's autotiling in detail.

Regarding the benches and furniture: It's possible to break up multi-tile objects like that into multiple images, but it's just often easier from a organizational perspective to just use sprites, or larger tiles. You could do the latter option by just making a new tile, but make it bigger than the standard terrain tiles (ie, a terrain tile is 64x64, a bench might be 512 x 64 to span a total of 8 terrain tiles. You'd just need to use those bigger tiles in a different TileMap, distinct from the one you're using to show the player the terrain.

by (676 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.