heygleeson / godot-ldtk-importer

LDTK Importer for Godot 4
MIT License
130 stars 11 forks source link

Simplify tile flipping #14

Open monkeez opened 6 months ago

monkeez commented 6 months ago

I think it might be possible to simplify the code that flips tiles since tile flipping was added back to Godot 4.2 (without the need to create alternative tiles).

heygleeson commented 3 weeks ago

As far as I can tell, unfortunately not!

The new improvements in Godot 4.2 seem to make it easier to flip tiles inside the editor, but under the hood it seems to work by still using alternative tiles (but in some undocumented way). For our purposes, there does not seem to be a new way to programatically flip a tile at a particular grid cell.

monkeez commented 3 weeks ago

It's been a while since I looked at it but I think this comment had info on how to do it:

https://github.com/godotengine/godot-proposals/issues/3967#issuecomment-1675438561

heygleeson commented 1 week ago

Happy to tell you it's now been implemented! Will be out in the next update - significantly reduces the amount of necessary alternative tiles generated.