Page 1 of 1
Alphabetical levels in RnD engine
Posted: Mon Sep 24, 2018 4:59 am
by BrownSky
Could the RnD engine be changed from requiring all levels to be in 3-digit format (000, 001, 002, etc... 999) to accepting anything that is a level file, and sorting the levels according to some convention - maybe the ASCII convention?
So you could have
001
001b
001c
001c multiplayer
002
002 alternate version
003
003 25/8/2018
etc.
This would make it way easier to manage levels, and test different versions of the same levels, and so on.
Re: Alphabetical levels in RnD engine
Posted: Sun Jul 20, 2025 6:54 am
by BrownSky
Hi, am bumping this idea. It would allow RnD to process levels in an alphabetical order, so that the designer would have more flexibility in handling their levels, giving them descriptive filenames, etc.
eg
apple.level
banana.level
banana20250718.level
zebra.level
etc. This would open a can of worms with how to sort files, eg the way Windows does it now seems to try to do some intelligent interpretation of levels, but I don't mind how it would be done.
I think this would still allow levelsets of numerically named levels to work as normal,
as the numeric ordering is also alphabetical, in a sense.
Also a feature to skip to the next existing level would be really cool,
eg if levelset contains
001.level
008.level
The ability to jump between the two without going through the non-existing levels, would be very helpful. Maybe it could be done with two extra arrow buttons outside of the existing arrow buttons?
Thank you.
John
Re: Alphabetical levels in RnD engine
Posted: Wed Jul 23, 2025 10:39 pm
by BryanFRitt
BrownSky wrote: ↑Sun Jul 20, 2025 6:54 am
Also a feature to skip to the next existing level would be really cool,
Are you perhaps asking about adding this feature?
MAIN MENU > SETUP > GAME & MENU > ALLOW SKIPPING LEVELS: "YES/ASK/NO"
Re: Alphabetical levels in RnD engine
Posted: Wed Jul 23, 2025 10:41 pm
by BryanFRitt
BrownSky wrote: ↑Sun Jul 20, 2025 6:54 am
I think this would still allow levelsets of numerically named levels to work as normal,
as the numeric ordering is also alphabetical, in a sense.
There's more than one way to sort...
uppercase first the lowercase then numbers...
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
Numbers first then earliest in alphabet then uppercase/lowercase
0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
and add in some special characters...
!"#$%&'()*+,-./@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_0123456789:;<=>?`abcdefghijklmnopqrstuvwxyz{|}~
also there's Unicode characters from other languages... sort one language before another?
and then there's do what ever sorting the OS is set to, although this might cause confusing ordering issues if people are using different sort orders.
Care about compatibility with file systems with limited/different filename capability? <-- I bet this can get messy.
8.3 format for DOS?
for more...
https://dwheeler.com/essays/fixing-unix ... names.html
Maybe just a subset of ASCII(Unicode?) order/filenames with 127* character limit alone would be good enough? (screwing up full compatibility with DOS 8.3 filenames)
* is too much? (or too little?)
Re: Alphabetical levels in RnD engine
Posted: Thu Jul 31, 2025 6:01 am
by BrownSky
BryanFRitt wrote: ↑Wed Jul 23, 2025 10:39 pm
BrownSky wrote: ↑Sun Jul 20, 2025 6:54 am
Also a feature to skip to the next existing level would be really cool,
Are you perhaps asking about adding this feature?
MAIN MENU > SETUP > GAME & MENU > ALLOW SKIPPING LEVELS: "YES/ASK/NO"
Hi Bryan,
No I don't mean that feature, I mean a new way of jumping between levels, it would apply when designing levels (which is my main interest) but could also apply when playing levels. (*** No, I changed my mind about that, see note at end. *** )
Let us say there is a folder containing 3 levels:
001.level
002.level
008.level
Currently if I am in level 002 in the level designer, and click on the arrow to the right of the level number,
it will take me to level 003. That is good and reasonable and sensible, but I would like to have another arrow button - maybe a different colour? Or two little arrows in a vertical arrangement, but both pointing right:
>
>
When this icon is pressed, the editor would jump all the way from level 2 to level 8.
There would be a corresponding left-pointing button for jumping back from level 8 to level 2,
as opposed to the current/built-in button, which would jump from level 8 back to [non-existent] level 7.
Above would not apply when playing, to be honest I don't know what happens when playing a levelset with missing levels, I assume that the program will auto-jump you to the next real level, as there would be no point in taking you to a blank/not really existing levelset.
(*** Remembering that a nonexistent level can still be provided with seeming existing data, due to the presence of a template.level file.)
Cheers, John
Re: Alphabetical levels in RnD engine
Posted: Thu Jul 31, 2025 6:12 am
by BrownSky
BryanFRitt wrote: ↑Wed Jul 23, 2025 10:41 pm
BrownSky wrote: ↑Sun Jul 20, 2025 6:54 am
I think this would still allow levelsets of numerically named levels to work as normal,
as the numeric ordering is also alphabetical, in a sense.
There's more than one way to sort...
uppercase first the lowercase then numbers...
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
Numbers first then earliest in alphabet then uppercase/lowercase
0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
and add in some special characters...
!"#$%&'()*+,-./@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_0123456789:;<=>?`abcdefghijklmnopqrstuvwxyz{|}~
also there's Unicode characters from other languages... sort one language before another?
and then there's do what ever sorting the OS is set to, although this might cause confusing ordering issues if people are using different sort orders.
Care about compatibility with file systems with limited/different filename capability? <-- I bet this can get messy.
8.3 format for DOS?
for more...
https://dwheeler.com/essays/fixing-unix ... names.html
Maybe just a subset of ASCII(Unicode?) order/filenames with 127* character limit alone would be good enough? (screwing up full compatibility with DOS 8.3 filenames)
* is too much? (or too little?)
Sure, good point, I was thinking about that. To be honest I wouldn't really care how the sorting was done, as long as the program could handle a levelset of level files with names including letters in the filenames (I am not talking about the file suffix, just the part in front of the fullstop, eg 001, 002, etc.
I understand though that there is a problem with an expanded capability, in that the alphabetical sort could result in the same levelset being sorted different ways on different platforms, in the worst case.
It would just be so good to have even the most basic, rudimentary way of sorting filenames alphabetically, as it would enable much easier handling of versions of a file, eg being able to jump between several versions of a level file just by clicking on the next button.
Or, you could give files nice names, like I think in Boulderdash some of the levels had an internal name - this would be external, i.e. in the file manager, so more for the level designer than for the player (but the player would benefit in the end).
Also it would mean you could move levels between levelsets with much reduced risk of filename collisions.
And if you still wanted to have a numeric sort, you would only need to make sure that each level had a unique number at the start of its name,
eg
001 falling rocks.level
002 beaucoup de diamonds.level
003 chasing fireflies.level
004.enter the butterfly level
005,amoeba!!!.level
Note that as long as the first 3 characters are unique, it really doesn't matter what characters 4 to ... are, the sorting will still be the same as if the files were just 001.level, 002.level, etc. Unless a file was named eg 001123.level, in which case I guess Windows might sort it after 002.level.
Cheers, John
Re: Alphabetical levels in RnD engine
Posted: Sat Aug 02, 2025 10:59 pm
by BryanFRitt
BrownSky wrote: ↑Thu Jul 31, 2025 6:12 am
And if you still wanted to have a numeric sort, you would only need to make sure that each level had a unique number at the start of its name,
eg
001 falling rocks.level
002 beaucoup de diamonds.level
003 chasing fireflies.level
004.enter the butterfly level
005,amoeba!!!.level
Note that as long as the first 3 characters are unique, it really doesn't matter what characters 4 to ... are, the sorting will still be the same as if the files were just 001.level, 002.level, etc. Unless a file was named eg 001123.level, in which case I guess Windows might sort it after 002.level.
Cheers, John
Looks like level names currently can go between 000.level ... 999.level
Not a/the developer of R'n'D nor have I created a custom level(so far), but I could totally imagine characters between the between the [0-9][0-9][0-9] and the .level being able to be ignored/dropped by anything that doesn't need them.
BrownSky wrote: ↑Mon Sep 24, 2018 4:59 am
Could the RnD engine be changed from requiring all levels to be in 3-digit format (000, 001, 002, etc... 999) to accepting anything that is a level file, and sorting the levels according to some convention - maybe the ASCII convention?
So you could have
001
001b
001c
001c multiplayer
002
002 alternate version
003
003 25/8/2018
etc.
This would make it way easier to manage levels, and test different versions of the same levels, and so on.
It does make since to be able to have variants of a level. Maybe at least something like "003 002.level" for variant 002 of level 003.
I could imagine players might not like doing several variants of the same level, so maybe for players there could be an option to only do the last variant, and/or only unique variants, or something like that.
--
Lol. What's the levelset with most number of levels? (of levelsets in ~/.rocksndiamonds/levels)
Code: Select all
find ~/.rocksndiamonds/levels -iname [0-9][0-9][0-9].level | grep -o '[0-9][0-9][0-9].level$' | sort -n -u | tail -n 1
354.level
Code: Select all
find ~/.rocksndiamonds/levels -name [0-9][0-9][0-9].level | grep 354.level
~/.rocksndiamonds/levels/Sokoban/sb_sokomania_spaceship_2/354.level
Re: Alphabetical levels in RnD engine
Posted: Mon Aug 04, 2025 2:06 am
by BrownSky
Yes. There could be a pair of modes that could be toggled between,
'Only use numerically-named levels'
and
'Use alphanumeric as well as numerically-named levels'
So for a levelset like this
001.level
001.20250803.level
001.alternative ending.level
001.bad.level
001.Tues.level
002.level,
mode 'Only use numerically-named levels'
would jump between
001.level
and
002.level,
whereas mode 'Use alphanumeric as well as numerically-named levels'
would enable stepping between all the versions,
in the order shown [?], which is alphabetical, in a sense, although there are to make on sorting of cases and numbers.
This would apply when playing AND in the level editor [I think the level editor is more important, though.]
Another very handy thing to be able to do would be able to sort and play/edit a levelset by the date modified timestamps of the levels. That would be really handy for identifying changes.
John
Re: Alphabetical levels in RnD engine
Posted: Tue Aug 05, 2025 10:10 am
by BryanFRitt
BrownSky wrote: ↑Mon Aug 04, 2025 2:06 am
So for a levelset like this
001.level
001.20250803.level
001.alternative ending.level
001.bad.level
001.Tues.level
002.level,
mode 'Only use numerically-named levels'
would jump between
001.level
and
002.level
'Only use numerically-named levels'
I get what you're saying, but imagine you're a user and you see this... probably a huh??? response and no clue as to what it's referring to.
Maybe settings options something like 'do main level variants only'/'do alternate level variants", and/or 'skip alternate level versions'/'play alternate level versions as well', or something along those lines instead. ideas?
So, asking for is a way to have variants of a level, a way to name them at the filename, and a way to sort all that?
I wonder if doing something like this would loose compatibility with something, like older versions of R'n'D, etc...
Re: Alphabetical levels in RnD engine
Posted: Tue Aug 05, 2025 8:12 pm
by BrownSky
Yes, you made a very good point. The setting descriptors I thought of are not at all user-friendly. Your ideas are much better.
My bad, as obscure and hard-to-understand descriptors for settings are a real bugbear to me - not referring to R'n'D specifically; applies to all apps, OS, BIOS etc. It would be nice if every app enabled the user to hover over a setting and get a full paragraph of explanation.
I don't think the enhancement would have to break old levelsets, as the 'no variants' setting is the same as current, and the 'all variants' setting wouldn't change anything for a levelset that is only 001.level, 002.level, etc. It also wouldn't apply to the Supaplex or Emerald Mines engines. Be good for it to apply to both of the RND and BDX engines, as BDX engine is the focus of current development and presumably more people are creating levels in it [?], but RND engine is the flagship engine, in my opinion, and will hopefully continue to be developed. Also MM engine I suppose. Or maybe this would be only a level editor thing and wouldn't apply/not apply to specific engines? What confuses me is that some engines have a different way of storing their level data; those engines should definitely be excluded, IMHO, and anyway those engines are kind of frozen in time, with little likelihood of being upgraded further .