Implement dynamic autotiling - #338
Conversation
|
Since the PR went a bit under the radar, I took some liberties with my previous questions to make it ready for the review. The current design goes like this:
I guess some further optimization can be achieved by storing the autotiling rules (which is a Also some cases are currently not handled, and they error-out here: Lines 368 to 374 in a566896 |
|
Sorry I never got to this, it's been a crazy year or two. This is some impressive work, I appreciate the effort. The main issue for me to decide here is whether or not this is "in scope" for this plugin. Typically I've defined the scope as: assets for LDtk projects + spawning of LDtk levels w/ some hooks. This is more like a re-implementation of LDtk autotile rules, which I think is definitely within the bounds of "LDtk integration" but not really in the bounds of "spawning LDtk levels". So, this is scope creep, but it may be acceptable scope creep. I'd like to hear your thoughts on this too.
Absolutely, I think this is heavy enough to warrant a separate feature flag. My question to you is - how difficult would it be to make this a 3rd party crate? And more specifically, if there's some inelegance or annoyance in making it a 3rd party crate, what changes could we make to this plugin to support it better?
I'd prefer to keep the code simpler and suboptimal for an initial implementation. |
Hello!
With this PR I'd like to add support for dynamic auto-tiling.
And by that I mean that layers who are auto-tiled depending on another int grid layer, will now have their tiles automatically updated whenever the values of the corresponding
IntGridCellare changed.You can see this in action in the screencap below, which happens to be captured from the new
autotileexample that I've also added to this repo.This is for now a draft PR and a request for feedback.
In particular, I would ideally like some maintainer to help me with the following questions.
EnableAutoLayer)? In the case of the latter, should the marker be added to all newly spawned auto layers by default, or should the user opt-in to this functionality?LayerMetadata. Do you agree? Or even better in a new component, since this only concerns int grid layers.The implementation itself is also a work in progress, after we settle on the above I'd like to do some refactoring and maybe also add some tests if it makes sense.