-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Allow autotiles to auto-transform tiles, per developer config. #39046
base: 3.x
Are you sure you want to change the base?
Allow autotiles to auto-transform tiles, per developer config. #39046
Conversation
82c4c17
to
8648869
Compare
Proposal: godotengine/godot-proposals#893 |
8648869
to
29df8f5
Compare
Allows the developer to specify allowed transformations (flip and transpose) for a given autotile subtile via a new method: TileSet.autotile_set_subtile_allowed_transformations(id, coord, flags). Autotiles will try the allowed transformations when searching for a matching bitmask, and apply a matching transformation to the cell being drawn into. This allows functioning autotile sets to be created with smaller textures, as rotated and flipped variants need not be included.
29df8f5
to
c77b3f7
Compare
It seems like a good idea to me. I guess the feature could make sense for 3.x. |
@akien-mga any chance to merge in next beta? |
71cb8d3
to
c58391c
Compare
If anyone is interested I added this PR into my custom build of Godot 3.x and you can download test builds from here. The test builds are generated by Github so are safe to run and even use in production but are not signed. |
I did some work on this (sorry if the links aren't enough, haven't used github much, tell me if I need to do something else), https://github.com/MystMagus/godot/tree/autotile-rotate-missing-property https://github.com/MystMagus/godot/tree/autotile-rotate-editor |
Missing property
@MystMagus I've merged in the PR for the missing property, but I don't really plan to do more work on this if it's just going to be made obsolete by Godot 4.0 in less than a year. |
@SquiggelSquirrel Oh? Are they changing something in relation to tiles/autotiling? |
@MystMagus yep, from what I understand, 4.0 is gonna completely overhaul the tilemap/tileset system. It seems like transforms will be a property of the tile rather than the cell. That would make this whple approach redundant, as it would just be a case of setting up alternative tiles for different transformations. I haven't looked into it too deeply, though, so I might have that confused. |
Allows the developer to specify allowed transformations (flip and transpose)
for a given autotile subtile via a new method:
TileSet.autotile_set_subtile_allowed_transformations(id, coord, flags).
Autotiles will try the allowed transformations when searching for a matching
bitmask, and apply a matching transformation to the cell being drawn into.
This allows functioning autotile sets to be created with smaller
textures, as rotated and flipped variants need not be included.