More musing on the level-replay-trophy association. (Trophies are checkmarks for solved levels.)
I'm slightly hesitant about (tying trophies to basename + title + author), and will improve the level-to-replay-matching first.
In theory, the following associations can each follow vastly different rules:
- For a given replay, find the level. (In 0.9.18, it's by level filename including path.)
- For a given level, find its trophy. (In 0.9.18, it's by level filename including path.)
- For a given level, find all replays. (In 0.9.18, it's not supported at all.)
Of course, Lix, as an ecosystem, is easier to understand if all these associations follow the same rule.
I'll implement: For a given level, find all replays that play meaningfully against it. I'll do this by looking at the basename (= filename without path) of level and replay: If the level is called
mylevel.txt, I'll find
mylevel-Simon-2000-01-01.txt. Rule: The basename should be identical to the head of the replay's basename, and the remainder of the replay's basename begins with a dash
-. Maybe I'll ignore numbers or other versioning strings (people like to make copies of a level but still consider it the same level for replay-level-association).
That leaves the decision about the association for later. In particular, this doesn't change any existing format.
-- Simon