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

AutoTile: Allow transpose/flip bitmask with transposed/flipped tiles #771

Open
Aldlevine opened this issue Apr 30, 2020 · 3 comments
Open

Comments

@Aldlevine
Copy link

Describe the project you are working on:
A platformer using 3x3 autotiles to draw spikes on floor/ceiling/walls.

image

Describe the problem or limitation you are having in your project:
When rotating autotiles in a tilemap, the connections are determined based on the bitmask without rotation. Because of this, when drawing spikes on walls I either have to disable autotile and draw by hand, or create an additional set of rotated tiles (this could also be a problem for flipped tiles, but not in my specific case).

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add a new option to autotiles such that the bitmask is flipped/transposed when the tiles are also flipped/transposed. This would save effort in building tilesets by removing the need to include rotated instances of certain tiles in the tileset or in manually placing flipped/transposed tiles in the tilemap.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Bitmask setup
image

Behavior
image

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It could possibly be handled with _forward_subtile_selection, but I have no experience with this function, so I'm not sure. One issue with this is that it would introduce a dependency on the TileMap from the TileSet (the TileSet would need to know if the specific cell is flipped/transposed which is defined in the TileMap, it would also need to know about adjacent cells).

Is there a reason why this should be core and not an add-on in the asset library?:
As far as I can tell, this would be difficult to build as an add-on in a generalized fashion. It seems like it would be useful in many cases, and would be intuitive.

@golddotasksquestions
Copy link

golddotasksquestions commented May 2, 2020

I think when using wang or autotiles, the general expectation is that you have to create the complete tileset (48 Tiles for 3x3 minimal). See here.

I don't know how autotiles would work logically, when you rotate the bitmask. That might be contrary to the whole idea of what an autotile is.

If you have a complete tileset, you certainly won't need to rotate. But I agree it kinda sucks that you have to do all this work upfront.

@Calinou Calinou changed the title [AutoTile] allow transpose/flip bitmask with transposed/flipped tiles AutoTile: Allow transpose/flip bitmask with transposed/flipped tiles May 3, 2020
@SquiggelSquirrel
Copy link

Possibly this: godotengine/godot#39046

@SquiggelSquirrel
Copy link

On closer inspection, I can see that this is different from my proposed feature. I'm talking about using this:
image
To create this:
image

Whereas you're more about using something like this:
image
To create any/all of these:
image
Using these controls:
image

Correct?

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

No branches or pull requests

4 participants