Skip to content

Conversation

JaThePlayer
Copy link
Member

@JaThePlayer JaThePlayer commented Jan 8, 2024

Started out as optimisation, ended up with bugfixes and cleanup as well 😅

  • Added the ability to disable automatic sorting of <set> elements, as it can be unintuitive and makes it harder to create complex tilesets.
<Tileset id="A" path="..." sortMode="none">
  • All code paths of TileHandler now use the Everest version of autotiler code - improves performance, simplifies the code and makes it much easier to implement new optimizations.
  • Introduced constants which explain the meanings for magic numbers within the byte[] Masked.Mask
  • Fixed a potential bug when using non-ASCII chars in GetByteLookup, used in <define> elements - now throws an exception instead of potentially not working or overwriting other custom masks in hard to predict ways. This should be fine, as I honestly don't know if anybody used this feature at all ☃️
  • Fixed the everest TileHandler being completely broken (it used to ignore the ignores="..." xml tag...
  • Big performance improvements for maps with tons of rooms - f5 in 9d went from ~4.5s to ~2.8s for me
    • Introduced a cache for tileset masks
    • Stopped using CheckForSameLevel potentially several times per tile, as it's O(n) complexity (n - number of rooms in the map). Instead, we calculate which room the currently checked tile comes from (still O(n), but only once per tile), and simply check if the surrounding tiles belong to the same room (O(1))
    • Various micro-optimisations combined with code cleanup

@JaThePlayer JaThePlayer marked this pull request as draft February 11, 2024 01:05
@maddie480 maddie480 added review needed This PR needs 2 approvals to be merged (bot-managed) and removed dormant labels May 17, 2025
@maddie480-bot maddie480-bot added draft This PR is not ready for review yet (bot-managed) and removed review needed This PR needs 2 approvals to be merged (bot-managed) labels Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

draft This PR is not ready for review yet (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants