Add wildcards to TileMapLayer terrain peering bits #12788
bernhardbarker
started this conversation in
2D
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Consider creating a terrain for walls that look like this:
It seems I'll need to create 4 copies of the numbered tile here (1 base and 3 alternative), to deal with all the possible combinations of top-left and top-right peering bits. Those are as follows:
1: top-left, top-right
2: top-left
3: top-right
4: neither
All of these will have the peering bits set for left, bottom-left, bottom, bottom-right and right.
Note that I need to use "match corners and sides" to deal with cases like the bottom left and right corners in the image. More specifically, the tiles marked with a square can only be identified as needing to be the tile that it is (as opposed to the solid wall) by noting that there's an empty tile to the bottom-left or bottom-right.
Every other outer tile (i.e. all 8 of those shown in the image) will also need 4 copies for similar reasons (the adjacent tiles can either go straight or turn outwards).
That's a lot of copies and a lot of work to set this up.
Side note: yeah, the perspective might be a bit off on those walls, but that doesn't change the fundamental issue.
Proposal
I propose adding a wildcard value for peering bits (
-1
is not a wildcard, it refers to empty space).The simplest implementation of this would be to make
-2
a wildcard - this will work with any existing projects.For the above, this will mean only needing 1 copy for each of those tiles, with a wildcard for the ambiguous peering bits for corners.
Note: I saw #4689, but that asks for an array of terrain types, which is different from, and more complex than, adding a wildcard bit (although if I could specify an array, that will also solve my problem).
Also related: #5575
Beta Was this translation helpful? Give feedback.
All reactions