Distinguish between levelsets on startup and with tapes?

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Distinguish between levelsets on startup and with tapes?

Post by Zomis »

I tried making two "test" levelsets, both levelinfo.confs identical except the author name (one was "zomis" and one was "zomistest"), the second levelset had fewer levels then the first.

I also place these levelsets in different levelgroups.
Playing the levelsets works fine.

But after playing the second levelset for a while, I exit RND and start it again. Well well well... now RND thinks I want to play the first levelset...
So, there's a problem here when distinguishing between levelsets.
Wouldn't it be possible to change the way RND stores "last_level_series" in levelsetup.conf?

However, I guess the same problem occours with tapes - since the tapes are just stored in a directory which has the same name as the directory of the levelset. How to distinguish between levelsets there?
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

R'n'D currently uses the level directory name as the "primary key" to distinguish level sets. Probably they both have the same name in your case -- just rename the directories to "zomis" and "zomistest", that's all.

This "primary key" is needed for network games (to uniquely identify level sets). (It could also be solved by an explicit directive in the levelinfo.conf file, though.)

Maybe it should be considered a bug if R'n'D encounters two identical level directory names, and should skip every subsequent level set with the same directory name (and issue a warning/error message before continuing)...
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:R'n'D currently uses the level directory name as the "primary key" to distinguish level sets. Probably they both have the same name in your case -- just rename the directories to "zomis" and "zomistest", that's all.
That's exactly what I wanted to avoid.
Holger wrote:Maybe it should be considered a bug if R'n'D encounters two identical level directory names, and should skip every subsequent level set with the same directory name (and issue a warning/error message before continuing)...
Which is exactly what happened :)
Okay that it isn't very often that two levelsets have the same directory name... (hmm... or maybe it is? *checking*) okay... it isn't very often at all... except those test levelsets I only have 2 levelsets with the directory name "other", which I've fixed myself (one containing various levels by Stinky and one containing various levels by Flumminator).

But still, there's more and more levelsets coming, so it would be nice if there could be any other way of handling that "primary key" (by including several subdirectories maybe? Not the whole path, but only after "levels").
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> That's exactly what I wanted to avoid.

Hum. Why?

> Which is exactly what happened Smile

Really?! Very good. I thought that it didn't warn...

But I think that it did not reject the subsequent levels with same dir name, but is just unable to memorize the last played set then (of course).

> But still, there's more and more levelsets coming, so it would be nice if
> there could be any other way of handling that "primary key" (by including
> several subdirectories maybe? Not the whole path, but only after
> "levels\").

I also thought of this. Unfortunately, it's likely that level sets get reorganized (I do this sometimes by myself, and Martijn also has his own ideas how to group sets together for maximum user friendliness). And if you download new sets, you might like to put them in the main "levels" directory, or in your "my Documents" level directory, or in a newly created level group directory. Therefore, the path may change. But if you want to play network games, you need a unique name that is the same on all systems, regardless if they use the "Artsoft", "Martijn" or "my very own" directory structure. :-)
User avatar
Jannik
Posts: 135
Joined: Fri Jan 27, 2006 2:55 pm
Location: Germany

Post by Jannik »

The best primary key would be a checksum of the level files ...
I think that's the only way to guarantee, that all network players play the same level and even the same version of this level. :roll:
Then it would be independent of the directory structure ...

Or just take the name from the levelinfo.conf ... but that would require every level creator to edit this file and define a unique levelset name ... :?

A little bit offtopic:
In my opinion, the current locations for levels and tapes are really confusing, especially the different relative paths of the tapes.
So what about changing this completely with a new RnD version?
Let's say:
all levels in
"..\My Documents\Rocks'n'Diamonds\levels"
and :IST tapes to
"..\My Documents\Rocks'n'Diamonds\tapes"
and user tapes to
"..\My Documents\Rocks'n'Diamonds\mytapes"
Ah, now I see, it's designed for several logon users at the same PC ... :oops:
I think there are few people out there who really logon with different user accounts, but it's praiseworthy that you designed it like this.
OK, than just one little change, what about moving the custom tapes from
"..\My Documents\Rocks'n'Diamonds\tapes\mylevelset\"
to
"..\My Documents\Rocks'n'Diamonds\mylevelset\tapes" ?
Would be more logical ...
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

>> That's exactly what I wanted to avoid.
>Hum. Why?
To see if RND can handle duplicate directory names ;)

>> Which is exactly what happened Smile
>Really?! Very good. I thought that it didn't warn...
>But I think that it did not reject the subsequent levels with same dir
>name, but is just unable to memorize the last played set then (of
>course).

Hmm... let's see... what did you write and what did I say?
I meant that what happened was that RND selected wrong levelset for me on startup. So I consider it to be a bug.

>I also thought of this. Unfortunately, it's likely that level sets get
>reorganized (I do this sometimes by myself, and Martijn also has his
>own ideas how to group sets together for maximum user friendliness).

That's true. The path could change a lot...


>The best primary key would be a checksum of the level files ...

Not for the "last played levelset", if you select your own levelset which you are working on as the current levelset, think about how many dozen times the checksum for that levelset could change!
Post Reply