Skip to content

Support incremental compilation #155

Open
@grunt-lucas

Description

@grunt-lucas

As we refactor Porytiles internals, I'd like to find a way to support incremental tileset compilation. That is: the user would supply a Porytiles-format tileset as well as a target Porymap-format tileset. Porytiles would then try to find the "diff" between these and output another Porymap-format tileset that incorporates the diff without shuffling around unchanged palettes and tiles. This would be a game-changer, since it would allow users the freedom to make tweaks to e.g. Vanilla Primary General without having to recompile every single secondary tileset for maps that want to use the Vanilla Primary General changes. You could simply swap in your update Vanilla Primary General on that map and the original secondary set would continue working.

One tricky thing to think about: how to handle cases where the user changes an already-existing metatile? There may be more than one metatile subtile that maps to the same base tile. This means we have to do some kind of reference count. If the user changes all subtiles that reference into the original base tile, then we can just change the base tile. But if the user only changes a subset, then we have to create a new base tile.

For palettes, we should be able to handle this by simply using the original palettes as overrides. We'll need some intelligent way to decide which palette slots could become wildcards. We can probably do this by creating a reference count for each palette slot by looking at the original metatiles. Any unreferenced slot can be made a wild card.

Metadata

Metadata

Assignees

Labels

featureNew feature or requestporytiles2Work related to the Porytiles 2 effort

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions