+3 votes

Pretty straight forward question: I want to be able to place more than one tile in the same position, I have square tiles that are full, and that are half cut to be able to some nice borders, but to do that I have to be able to place my half cut tiles on top of an existing tile of another type.

When I try to place a tile in a occupied space it will just replace the older one. I tried to look at the whole inspector, search for it, but couldn't find a thing about this. I don't know if I'm missing something obvious because to me it's a pretty basic feature of a tilemap.

Here is an example: Full and half cut stone tiles.

Here you can see an example: Full and half cut stone tiles

in Engine by (18 points)

1 Answer

+3 votes
Best answer

Create a second tilemap (you can use the same tilset, on both tilemaps). Then you can add two tiles on the same location.
When you check for tile type/collision events, make sure you change the tilemap name in the collision function.

by (528 points)
selected by

If many tilemaps can collide, put them in different layers.

Thank you for your reply MrMonk I thought about that aswell. But apart from the borders I think a common issue is the need to be able to place other stuff like vegetation, rocks, walls, general furniture on top of each other (this is my case aswell).

That could quickly turn into an organizational issue, since I would have to create and manage a TileMap for each. There is an alternative appart from this and coding my own solution?

If you have any thoughts about this or other possible resolution I would love to know.

well, from what I've seen, tile map projects have many tilemaps combined with static bodies, that are not part of the tilemap/tileset, but act as a specialized tile. In my current project I have two tilemaps (one is on a different collision mask), and about 5 specific tiles made from staticbodies with collision shape and navigation poly. I use tilemaps when I need many tiles of the same type, otherwise I use staticbody tiles.
Aslo I must say I don't really understand the complexity of your problem, do you need specific collisions for different type of tiles ? If you don't can't you use just simple sprites to fill in your design ?
I also use an "invisible" tile, is part of a tilemap, and I'm using it for navigation where I need a break in, but I also need that part not break the navigation path. (not sure if it's of any use to you)

It's my first time using Godot, and I'm still trying to discover if it's a good option for my project. In this moment I'm not worring about collisions nor navigation, but with the efficiency the artists will have while mapping the gameworld. It seems to me rather workful to have them manually copying, altering and placing nodes in comparison to just dragging and dropping them in a multilayered tilemap editor. You can imagine for example, the painful work of placing a great number of tables with different objects on top of them.

I'm also worried about making them manage multiple tilemaps for every layer there is, as it could lead to future organizational problems. I guess the only option is coding my own solution?

have you seen this:
it allows you to make your maps into the tilemap editor (http://www.mapeditor.org/) and used them into Godot. I never used it though, but it says:
"Support for image and object layers"... I don't have other ideas, Godot's editor is "single layered" and the only way you could have multiple layers is through addition of more tilemaps..

The asset could be really helpful, I'll surely give it a go. If not I'll make sure to post here whatever I find useful. Thank you very much for your time and patience :)

If there are many different objects, using snap on the editor should be enough if you need regular objects placed on a grid.

There is another plugin for other type of design (non tiled) but may work fine with grid designs as well, look for "asset dropper" on the asset lib.

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 Frequently asked questions and 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.