Skip to content

consider nearby levels when evaluating auto-rules - #1241

Open
SquareMan wants to merge 1 commit into
deepnight:masterfrom
SquareMan:neighbor-auto-tiles
Open

consider nearby levels when evaluating auto-rules#1241
SquareMan wants to merge 1 commit into
deepnight:masterfrom
SquareMan:neighbor-auto-tiles

Conversation

@SquareMan

@SquareMan SquareMan commented Aug 17, 2026

Copy link
Copy Markdown

Closes #716

This is a first pass on this feature. I tried to implement it as minimally invasive as possible, but as far as I can tell levels interacting with each other is a pretty new concept to ldtk so I wouldn't be surprised if you have a lot of feedback.

Note: I am using a "dual-grid" tileset system in this example. That is why the int grid is offset from the level bounds.
Gif:
Recording 2026-08-16 183952

Considerations:

  • Undo/Redo: Changes to neighboring levels are not saved to any timeline, but neighboring level's auto-rules are revaluated whenever a level undo/redo event occurs. This seems "fine" since no actual tile placement will change in a neighboring level, just their auto-tile cache, but I might be missing something.
  • Neighboring levels are invalidated to ensure that they will be marked as dirty and have any updated auto-tiles saved when the project is saved.
  • Auto-tile rules are reevaluated when a level is moved

Now I'll be trying to actually use this patch for a while in my own project and see if I find anything missing :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request] Add support for rules to work with neighboring levels

1 participant