Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile groups: Give better names, support copypaste #412

Open
SimonN opened this issue Feb 10, 2021 · 2 comments
Open

Tile groups: Give better names, support copypaste #412

SimonN opened this issue Feb 10, 2021 · 2 comments
Labels

Comments

@SimonN
Copy link
Owner

SimonN commented Feb 10, 2021

Lix 0.9.35

Tile groups get names 0, 1, 2, ... based on their appearance in a level file. When you copypaste by hand the tile group "0" into a different level by hand, chances are that there is already a "0" in the target level. You must rename one of the "0".

Give names that stand higher chances to be globally unique, e.g., based on system time or included tiles.

@SimonN SimonN added the 4-minor label Feb 10, 2021
@SimonN
Copy link
Owner Author

SimonN commented Nov 15, 2021

This will go in Lix 0.9.40. See next post for reasoning.

I don't know yet whether I want to add the level title, the tile names, the level saving date, ..., to the names of the tile groups.

Most likely, I'll keep the running count somewhere in the name, to guarantee unique group names at least per level.

@SimonN
Copy link
Owner Author

SimonN commented Jan 12, 2022

This isn't yet in Lix 0.9.40.

The main reason is that I don't want unnecessary diffs when you re-save a level. If we use

  • a random string, or
  • the datetime of the most recent level editing (regardless of second or millisecond resolution),

...we would run into the issue that all groups get new names during saving. Even if you merely move a single unrelated tile, the new group names would generate big multi-line diffs throughout the level text file.

For now, I've merely documented in doc/formats/level.txt how to move groups manually: Their names, in all 0.9.x, are free-form text strings, not numbers. You can manually change the group names in one level from 0, 1, ..., to a0, a1, ..., and then copy these manually renamed groups into a second level without fear of clashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant