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

Allow autotiles to auto-transform tiles, per developer config. #39046

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

SquiggelSquirrel
Copy link

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.

@SquiggelSquirrel
Copy link
Author

Proposal: godotengine/godot-proposals#893

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.
@Calinou Calinou added this to the 3.2 milestone Jan 5, 2021
@SquiggelSquirrel SquiggelSquirrel requested a review from a team as a code owner March 12, 2021 12:26
Base automatically changed from 3.2 to 3.x March 16, 2021 11:11
@aaronfranke aaronfranke modified the milestones: 3.2, 3.3, 3.4 Mar 16, 2021
@groud
Copy link
Member

groud commented Apr 6, 2021

It seems like a good idea to me. I guess the feature could make sense for 3.x.

@boruok
Copy link
Contributor

boruok commented Oct 18, 2021

@akien-mga any chance to merge in next beta?

@Chaosus Chaosus modified the milestones: 3.4, 3.5 Nov 8, 2021
@akien-mga akien-mga force-pushed the 3.x branch 2 times, most recently from 71cb8d3 to c58391c Compare January 6, 2022 22:40
@filipworksdev
Copy link

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.

@akien-mga akien-mga modified the milestones: 3.5, 3.x Jul 2, 2022
@MystMagus
Copy link
Contributor

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
The later especially is work on enabling the feature in the editor, though it's a bit sloppy since it was only for my personal use. I made a pr of the first branch (which is just a small fix) but the author doesn't seem to be active on it at the moment.

@SquiggelSquirrel
Copy link
Author

@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.

@MystMagus
Copy link
Contributor

@SquiggelSquirrel Oh? Are they changing something in relation to tiles/autotiling?

@SquiggelSquirrel
Copy link
Author

@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.

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

Successfully merging this pull request may close these issues.

10 participants