Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilemap tools in terrain mode 'connect mode' and 'path mode' not behaving as described or in a predictable way. #71829

Open
OddlifeDev opened this issue Jan 22, 2023 · 4 comments

Comments

@OddlifeDev
Copy link

Godot version

4.0 Beta 14

System information

Mac OS 11.6.7

Issue description

The connect mode tooltip tells me

'Paints a terrain and the connects it with surrounding tiles of the same terrain'

However as shown in this gif it only works on squares and does not seem to check diagonal squares at all meaning you can not make use of diagonal tiles with this autotile mode.

godot_tilemap_01

Path mode has similar issues, i feel like this is doing what it is described as, but the fact that it disconnects other paths makes it kind of useless.

godot_tilemap_02

Here is an example of trying to use both tools to create a diagonal room. Very frustrating and unhelpful!

godot_tilemap_03

Steps to reproduce

Create a 256 bit-masked image with edges and corners and try and make a diagonal room using autotile

Minimal reproduction project

x

@groud
Copy link
Member

groud commented Jan 23, 2023

Could you provide a minimal reproduction project with your terrain setup please ?

@groud groud self-assigned this Jan 23, 2023
@groud groud added this to the 4.0 milestone Jan 23, 2023
@OddlifeDev
Copy link
Author

@groud sure thing, attached a minimal reproduction project here.

tilemapping.zip

@groud
Copy link
Member

groud commented Jan 25, 2023

So, you Terrain setup cannot work well with "pure" diagonals.

When you try to connect a tile to another diagonally, the algorithm puts a constraint in the corner of the tile. Such constraint requires all tiles surrounding that "vertex" to comply with the constraint. If it cannot find a matching solution, it kind of tries to solve the situation as best as it can, but often fails to do so (resulting in some disconnections). As a consequence, you need a some tiles to fill in those corners (it is still missing some but you get the idea):
256_tilset

That being said, even with that change, I was not able to create those "pure diagonals". That was due to the algorithm used not enforcing connection on diagonals, as this is sometimes not welcome (mainly when you can to paint a single tile next to a big blob). Thus, I implemented a new painting mode that allows you to force-connect to the surrounding corner tiles. See #72030, it should help with your issue.

@Bropocalypse
Copy link

Is this related to the regression where 'ignore' bits are no longer possible in autotile/terrains?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

6 participants