What are the official names of level sets?

Stuck at a level? Need help with R'n'D or anything R'n'D related? Post here!

Moderators: Flumminator, Zomis

Post Reply
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

What are the official names of level sets?

Post by BryanFRitt »

Holger wrote: Fri Oct 22, 2021 11:56 pm
Would a user replacing 'spaces' with '_' in folder names for either the 'levels' folder and/or 'tapes' folder and/or 'scores' folder and/or 'levelsetup' folder, ... cause any problems?
No, that's fine. Just make sure that you don't forget any of those directories, or R'n'D cannot find the corresponding tapes, or scores, or ...

But you don't have to do this, as long as you do not plan to auto-validate tapes on the command line using the "-e" switch and the "autotest" command (or generally the "autoplay" family of commands), as it treats spaces as separators for level set identifier and level numbers when parsing strings like "This_cool_level_set 001 002 003". So renaming a level set from "This cool level set" to "This_cool_level_set" does not hurt on the server, and may be required when using "autotest" locally. However, renaming it to "This_Cool_Level_Set" would result in a new level set to be "detected" (which will then be seen as missing on the score server, as there is only "This_cool_level_set" -- the file system used on the server is case sensitive).

But maybe I should transform all level sets on the score server to lowercase letters, or something like that, as people might like to adjust level set directories to use either upper or lower case letters on their computer...
Not sure, but I may have already changed the names, and letter case on the ~/.rocksndiamonds/levels folders/directories a long time ago. What's the official letter case and names of the levelsets? Will it make a difference on the high score server?

Possible things that I may need to be renamed to match server expected names...
NOT THE OFFICIAL LIST, DON'T USE THIS AS A CHANGE TO LIST

Code: Select all

/bin/ls -1 ~/.rocksndiamonds/levels --group-directories-first
alaias
BD2K3
'BD Dream'
'Contributions 1995 - 2006'
DX-Boulderdash
'Earth Shaker'
'Earth Shaker Explosions'
Emerald_Mine_Club
'Legend Of Zelda'
'Legend Of Zelda II'
mod_secret_command
'Richard Kleber'
rnd_jue
rnd_jue-3.3.0.0
'Snake Bite'
Sokoban
'Sulps levels'
Supaplex
Supaplex_old
'Tutorial Alpha'
'Walpurgis Flashbacks'
'Walpurgis Gardens'
'Walpurgis World'
...

Code: Select all

ls -1 ~/.rocksndiamonds/levels/Richard\ Kleber/ --group-directories-first
'Earth 3120'
'EEM 1'
'EEM 2'
Natural
'Secret Command'
'Some Levels'
temp
'The Invasion of the Spaceships'
'The Rebellion of the Spaceships'
Vulcano
'World of Amoeba'
...

Code: Select all

ls -1 ~/.rocksndiamonds/levels/Richard Kleber/Secret\ Command/ --group-directories-first
'SC Tutorial'
'Secret Command I'
'Secret Command II'
...

Code: Select all

ls -1 ~/.rocksndiamonds/levels/Richard Kleber/The\ Invasion\ of\ the\ Spaceships/ --group-directories-first
'Episode 1'
'Episode 2'
'Episode 3'
...

Code: Select all

ls -1 ~/.rocksndiamonds/levels/rnd_jue  --group-directories-first
jue0
jue_bug_machine
jue_edit_inside
jue_game_inside
jue_j1_edition
jue_puzzle_mix
jue_puzznic
jue_sobigo
jue_west
...

Code: Select all

ls -1 ~/.rocksndiamonds/levels/Sokoban/  --group-directories-first
sb_mas_sasquatch
sb_microban
sb_sasquatch_1
sb_sasquatch_3
sb_sasquatch_4
sb_sokomania_spaceship_1
sb_sokomania_spaceship_2
...
...
and maybe more?
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: What are the official names of level sets?

Post by filbo »

The directory name in tapes/... seems to be the same as the leaf directory name in levels/...

Holger, while retaining that, could you add a levelinfo.conf key, something like 'dirname: zelda_2'? Which would instruct a different, preferred place to store tapes / scores. Then add that to all the levelsets with spaces in their directory names.

As a nicety, when RnD looks for tapes for a levelset with that key, it should also look in the old-default directory name with spaces, and move any tapes it finds there into the dirname-specified place.
User avatar
Holger
Site Admin
Posts: 4071
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: What are the official names of level sets?

Post by Holger »

bryan wrote:
What's the official letter case and names of the levelsets?
There is none, that's the problem. :-)

For most levels released by myself (either within the R'n'D package, or as separate level set packages), I tend to use something that consists of only lower case letters, numbers and underscores (like "rnd_tutorial_niko_boehm"), but sometimes also upper case letters (like "BD2K3") -- something similar to variable names in C. ;-)

But this is not mandatory. People tend to release their level sets by themselves (mainly as download links in the forum) with their own, preferred package and directory names, like "Rebellion of the Spaceships" -- and this also works fine, as long as it is a valid directory name on all systems (which is more or less everywhere the same, fortunately, with only a few exceptions).

There is only a disadvantage in using spaces (which most people do, as most of them are not computer scientists, which tend do replace spaces with underscores or other non-space characters, mainly for historical reasons), because using such names with spaces on the command line always requires quoting to separate things (to be able to tell if the string "my cool level set 002" means all levels of level set "my cool level set 002", or level "002" of level set "my cool level set").

As most people are on Mac, Windows or Android, and don't care about the command line anyway, this is not that big of a problem. And if you want to fiddle with R'n'D's command line options, you usually know what to do. And maybe I should just extend the options regarding level sets on the command line to something like that:

Code: Select all

# How it is now:
$ ./rocksndiamonds -e "autotest rnd_tutorial_niko_boehm 001 002 003"

# How it could be in the future:
$ ./rocksndiamonds --level-set "Rebellion of the Spaceships" -e "autotest 001 002 003"
This would remove all problems with level set names containing spaces, and would be easy to implement.

filbo wrote:
The directory name in tapes/... seems to be the same as the leaf directory name in levels/...
Yes, right; it's used as the internal level set identifier to reference each level set.
Holger, while retaining that, could you add a levelinfo.conf key, something like 'dirname: zelda_2'? Which would instruct a different, preferred place to store tapes / scores. Then add that to all the levelsets with spaces in their directory names.
I also thought about something like that! The main problem with this approach is that you cannot easily just copy an existing level set (from "filbo" to "filbo_2", for example, simply by using the graphical file explorer of your operating system) and just go on, and everything works as expected -- because this would result in your tapes of the new level set "filbo_2" overwriting the tapes of your old level set "filbo", which an average GUI user might just not expect.

So, correctly adjusting the "levelinfo.conf" (as would be required to prevent the above havoc) might be that one step that is already too much for the "keeping things as easy as possible" approach. :-)

(And yes, I've already seen a number of nice, new level sets from people who just did not care about the contents of their "levelinfo.conf" file, so this is not just a theoretical scenario.)
As a nicety, when RnD looks for tapes for a levelset with that key, it should also look in the old-default directory name with spaces, and move any tapes it finds there into the dirname-specified place.
Doing something like this is always a bit dangerous (for cases like the above), as it could result in files overwritten by accident, due to improperly prepared entries in config files, with the need to handle these cases (by either stopping, asking the user, writing out warnings, having to use fallback paths to access things etc.), makes things worse in some cases.

And then, does it really make things more clear and simple to store the level set in a directory "Legend of Zelda II", but the corresponding tapes in a directory "zelda_2"?

Nevertheless, I got a lot of ideas how to "do things right"[tm] from your comments and suggestions --thank a lot for them! :-)
Post Reply