v4.4.1.1 and v4.4.1.2 - Windows 11

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

Moderators: Flumminator, Zomis

Post Reply
roger-bratseth
Posts: 5
Joined: Mon Jan 05, 2026 8:18 am

v4.4.1.1 and v4.4.1.2 - Windows 11

Post by roger-bratseth »

Hello, love your project!

I have recently installed v4.4.1.1 and v4.4.1.2 using the installer on a Windows 11 HP Laptop.

My progress is not saved, and also not the scores. Anyone else experiencing this?

Kind regards,
Roger Bratseth, Norway
User avatar
Holger
Site Admin
Posts: 4380
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by Holger »

Hello Roger, first of all, welcome to the R'n'D forum! :)

May it be possible that Windows 11 has decided to not let ordinary programs write to the login user's "Documents" folder?

Because, I know that I do not follow the recommended way to store program data on the Windows platform. When following the "standard", I think I would have to store such stuff in a directory like "%APP_DATA%" or something like that, which would end up with program data being stored in a hidden directory effectively not accessible by most normal users. As this includes data like user created levels, recorded tapes and configuration data (plus log files that I sometimes ask for when users report problems), it seems to make sense to store it at some place that is easily accessible even for a non-technical user. :)

As operating systems get stricter and stricter over time regarding access to user data (which theoretically is a good thing), this might be the cause in this case, too. (For example, when starting R'n'D on macOS, where R'n'D also attempts to write its data into the "Documents" folder, it asks if it is allowed to access that folder on the very first start.)

Unfortunately, the last Windows system I have access to is a Windows 10 VM on my old intel Mac, so I cannot test this by myself.

Does anybody else have information about how Windows 11 might handle writing to the "Documents" folder?
filbo
Posts: 730
Joined: Fri Jun 20, 2014 10:06 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by filbo »

RnD creates Windows 'folder' (directory) ...\Documents\ ??what?? -- RnD? Rocksndiamonds?

I am thinking that if Roger were to pre-create the target directory, maybe RnD would work. So that's both a troubleshooting suggestion & a possible workaround.

(But then, I look in 4.4.0.5 source that I have handy, and the only mention I can find of 'Documents' is in src/libgame/setup.c inside `#if defined(PLATFORM_MAC)` ??? )
User avatar
Holger
Site Admin
Posts: 4380
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by Holger »

R'n'D uses "SHGetFolderPath(NULL, CSIDL_PERSONAL, ...)" for the Windows platform, which results in "%USERPROFILE%\Documents" (with "%USERPROFILE%" itself expanding to the user's home directory).

The final path for the directory where R'n'D stores its program data files on Windows is then "\Users\username\Documents\Rocks'n'Diamonds". (While the WIndows file explorer usually displays the "Documents" part with some translated name like "Dokumente" on German Windows systems, just like it is done on the Mac.)
filbo
Posts: 730
Joined: Fri Jun 20, 2014 10:06 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by filbo »

Yikes, it [that is, Windows (and/or Mac)] actually gaslights the user with a fake translated pathname? And then users type that into other bits of software and ... what, the OS back-translates the localized pathname to the underlying English version? And gets conjugation and stuff like that right? eeeeeek
roger-bratseth
Posts: 5
Joined: Mon Jan 05, 2026 8:18 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by roger-bratseth »

Hello guys, and thanks for the warm welcome, nice to be here!
The folder under 'Documents' is created and files are being written. I can change the settings, and they are recalled next time I open the game.
But every time I start the game, I have to play from the first level (I can of course skip with a warning).
I'm a bit puzzled by the highscore-screen after each level. It contains a list with numbers, dots and a score of '00000'. I can move up and down the list with the cursor. I can also select 'next' on the top, but get a warning. I can press space or enter to go to next level.
So I guess my name should automatically be entered into the empty highscore-list?

/Roger
Attachments
rnd_highscore.png
rnd_highscore.png (199.28 KiB) Viewed 202 times
roger-bratseth
Posts: 5
Joined: Mon Jan 05, 2026 8:18 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by roger-bratseth »

I've made an archive of the folder in 'Documents', in case it is helpful for you. I have started the game, maybe 10 times, and played a few levels (of course, the same two or three levels every time ;-)

/Roger
Attachments
Rocks'n'Diamonds.zip
(6.72 KiB) Downloaded 7 times
roger-bratseth
Posts: 5
Joined: Mon Jan 05, 2026 8:18 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by roger-bratseth »

This is my full path: C:\Users\brats\Documents\Rocks'n'Diamonds

My OS is in Norwegian.

/Roger
User avatar
Holger
Site Admin
Posts: 4380
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by Holger »

Thank you for the detailed information, and for the archive of your R'n'D folder -- it was in fact very helpful!

And I was indeed able to reproduce the problem using my Windows 10 VM, and after some debugging I found the root cause of this issue!

The problem is limited to the Windows platform, but affects all new users there (while users with an already existing R'n'D folder with complete sub-folder hierarchy won't notice any problems).

The cause of the problem is assuming that directories are separated by the "/" character, which of course is not true on Windows (which uses "\" instead, as can be seen in the previous post). I even have defined a platform independent constant "CHAR_PATH_SEPARATOR" in the code, but did not use it when doing a "clever" change in 4.4.1.0. :shock:

So this is a really stupid bug, with terrible consequences for all new R'n'D users on Windows! :o

A hotfix release will follow within the next 24 hours. Sorry! :(
roger-bratseth
Posts: 5
Joined: Mon Jan 05, 2026 8:18 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by roger-bratseth »

Indeed terrible consequences! :lol:

Happy to help, and happy to try some new levels in a few days!
Keep up the good work.

One of my first games on the Amiga 500 back in 1987 this. It was actually called Boulder Dash (the disk), and the executable 'bd.exe'. 'Volker' was saved as a player profile.
It didn't like RAM expansion, assumed all memory was chip mem. I actually tried to modify the code to run on all Amigas, but I never finished. But there is also WHDLoad, which makes running old titles on newer hardware possible.

Have a nice day!

/Roger
filbo
Posts: 730
Joined: Fri Jun 20, 2014 10:06 am

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by filbo »

I see Holger has already analyzed and is preparing to fix this! But I had already written this so I guess I will send it in anyway :)

Your account's Rocks'n' Diamonds directory is missing several subdirectories: it should have, in addition to 'cache' and 'levels', also 'levelsetup', 'scores', and 'tapes'.

You could try making those yourself. But in normal operation, the game would have done this automatically, so something is definitely wrong.

The file 'artworkinfo.cache' is also peculiarly small, in fact recording info about only the 'rnd_tutorial_ncrecc' levelset and nothing else. I think, even with just the default game package installed, it should have info about 8 (or so) levelsets. But, I have never studied RnD behavior in Windows, and also my local version is a few months out of date, so it's possible this part is just normal.
User avatar
Holger
Site Admin
Posts: 4380
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by Holger »

You could try making those yourself. But in normal operation, the game would have done this automatically, so something is definitely wrong.
Yes, you're right, that would indeed solve the problem here. So if you cannot wait to start playing, Roger, this would work. :)
The file 'artworkinfo.cache' is also peculiarly small, in fact recording info about only the 'rnd_tutorial_ncrecc' levelset and nothing else. I think, even with just the default game package installed, it should have info about 8 (or so) levelsets. But, I have never studied RnD behavior in Windows, and also my local version is a few months out of date, so it's possible this part is just normal.
That's fine, because it only caches artwork (and "rnd_tutorial_ncrecc" is the only level set in the base package that contains custom artwork).
Happy to help, and happy to try some new levels in a few days!
Thanks a lot for your bug report! I'm sure that for each R'n'D user reporting a problem here, there must be several others just silently giving up. So I am glad that I was able to fix this bug thanks to your help!
One of my first games on the Amiga 500 back in 1987 this. It was actually called Boulder Dash (the disk), and the executable 'bd.exe'. 'Volker' was saved as a player profile.
Sounds like an early beta version of Emerald Mine by Volker Wertich, one of the two programmers of Emerald Mine! Be sure to add the "Emerald Mine Club" level collection to R'n'D, to be able to play Emerald Mine with original artwork! :D
User avatar
Holger
Site Admin
Posts: 4380
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: v4.4.1.1 and v4.4.1.2 - Windows 11

Post by Holger »

OK, a patched new version 4.4.1.3 is available now -- hope it works better now! :)
Post Reply