Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

R'n'D is always evolving. Check here to see if a new version is out.

Moderators: Flumminator, Zomis

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

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

is it possible for BD-engine levels made in RnD to have descriptions / story? this would be useful for a BD tutorial i want to make
Definitely yes, and this should be documented here once the final version is released. You can already make use of this (not only for BD style levels, but for levels using any game engine available in R'n'D), and it works as follows:

For level set descriptions, this already works with the current stable R'n'D version (4.3.8.2), by simply placing a file called "README" (or "README.txt", or "readme.txt", or ...) into the level set directory (that is, next to all those "xxx.level" files). If such a file is found, an icon is placed on the main menu screen, which you can click to view the contents of this text file. (See the default level set "Niko Böhm's Tutorial" for an example.)

As only one page of text is possible in version 4.3.8.2 and earlier, you can also define more than one page by using multiple level set info text files placed as files "docs/levelset/levelset_<nr>.txt" (with <nr> being a number) instead of a single "README" file.

The new version 4.4.0.0 extends this in several ways. First of all, text that is longer than the screen is supported by adding a scrollbar to scroll the text.

Then, two more types of info text messages are supported now: Level info text and Level stories. To add them to your level set, just create text files "docs/levels/xxx.txt" (like "docs/levels/001.txt" for level "001") for level info text and "docs/stories/xxx.txt" for level stories. (You can also use a file "001.txt" next to "001.level" in the main level set directory to add a level info text file.)

For level info text files, an icon is placed on the main menu screen, just like for level set info text files. For level stories, a screen will be shown right before the game for this level starts (either every time, only once per running R'n'D, or never, which can be configured in the setup menu). On the "level info" screen in the info screen menu, both the level info text and the level story will be displayed, but this currently only works for BDCFF format BD levels from the GDash level package (but will be supported that way in the final release).

The idea behind separating level info texts into "level info" and "story" files is as follows: Use a "level story" file for text that should be read before playing the level (like envelope texts in R'n'D style levels), while "level info" might contain hints to solve the level or trivia around that level, that is, some info that you may not want to read before playing the level, or that you do not need to read before playing that level.

As already possible in 4.3.8.2, you do not have to limit your text files to plain text, but you can use some simple markups, like those used in the "Niko Böhm's Tutorial" level set:

Change font by adding a line like this:

# .font: font.text_2

Change between centered and non-centered text:

# .centered: true / false

Change between wrapped and non-wrapped text:

# .autowrap: true / false

Disable parsing those special lines (to use lines starting with a "#"):

# .parse_comments: false

(Obviously, re-enabling parsing comments after disabling them is bot possible.)

To add a line break without adding a following empty line, add two spaces at the end of the line (markdown style).

If you should have any further questions how to create level info text and level stories, please let me know!
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

While playing around with editor, I found few issues which carried over from rc3 to rc4 which I don't know if they're intended or not: [...]
As ncrecc already wrote, all these three observations are indeed behavior that was taken from the GDash engine.
ncrecc
Posts: 285
Joined: Thu Jul 12, 2018 12:59 am

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by ncrecc »

normal rocks have animations when they're being pushed, but waiting rocks don't:
waitingrock.gif
waitingrock.gif (58.33 KiB) Viewed 6213 times
BryanFRitt
Posts: 253
Joined: Mon Nov 13, 2017 4:16 pm

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by BryanFRitt »

BOULDER DASH > ACHMIN HAERTEL > CAVE 04
Crashed when finishing level
Just loading this tape that was saved before this crash using the shortcut from the MAIN menu causes a crash.[update: weird tried again, it didn't crash this time.] When loading tape via keyboard shortcut, after starting level, it looks like it's a bad tape, and not how I left it.

Code: Select all

Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x000055555576bdb9 in gd_sound_play (cave=0x0, sound=GD_S_BONUS_LIFE, element=O_NONE, x=32, y=18)
at bd_sound.c:498
498         x = (x + cave->w) % cave->w;

Code: Select all

(gdb) bt
#0  0x000055555576bdb9 in gd_sound_play (cave=0x0, sound=GD_S_BONUS_LIFE, element=O_NONE, x=32, y=18)
at bd_sound.c:498
#1  0x000055555576baec in gd_sound_play_bonus_life () at bd_sound.c:387
#2  0x000055555576680b in add_bonus_life (game=0x55555ee363f0, inform_user=1) at bd_gameplay.c:55
#3  0x00005555557668ea in increment_score (game=0x55555ee363f0, increment=99) at bd_gameplay.c:82
#4  0x0000555555767240 in iterate_cave (game=0x55555ee363f0, player_move=GD_MV_DOWN, fire=0)
at bd_gameplay.c:280
#5  0x0000555555767982 in gd_game_main_int (game=0x55555ee363f0, allow_iterate=1, fast_forward=0)
at bd_gameplay.c:473
#6  0x000055555576815b in play_game_func (game=0x55555ee363f0, action=8) at bd_gameplay.c:679
#7  0x0000555555747e74 in GameActions_BD (action=0x7fffffffd6c8 "\b") at main_bd.c:422
#8  0x00005555556e5feb in GameActions_BD_Main () at game.c:12401
#9  0x00005555556e5e3a in GameActionsExt () at game.c:12324
#10 0x00005555556e5f9c in GameActions () at game.c:12388
#11 0x00005555556b71ab in HandleGameActions () at screens.c:10793
#12 0x0000555555678c18 in EventLoop () at events.c:380
#13 0x000055555566a2ef in main (argc=2, argv=0x7fffffffd878) at main.c:9647
Also, still have to be in 'TEAM' mode to play single player.
Using Debian Stable Linux, Debug compile of rocksndiamonds-4.4.0.0-test-4
--- Strike a balance between generating new things/ideas, and being good/organized. Pick somewhere between a gibberish mess and nothing said/done. ---
--- :) R'n'D core completed! :) ---
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Tue Dec 03, 2024 5:22 pm assorted bugs:
1. in the BD caves, pushing a bubble has the default RnD push sfx
2. when you solve a BD cave, the palette change to the next cave happens even though the game fades to black in-between (which happens even if "show scores after game" is disabled):
solvelevel.gif
3. it is impossible to record a solution tape for Crazy Dream 9 level 1, even though the level itself is solvable. the fireflies are set to spawn more players after they explode, but when you die to the fireflies, you immediately get a "game over" and the tape stops recording even though more players spawn afterward. not sure what a robust solution to this would be. the minimum this situation would require is to check whether any "player birth" elements are present, or any explosions that are set to end in a "player birth" element are present, before triggering a game over.
onediamond.png
All three bugs are fixed now.
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Tue Dec 03, 2024 6:18 pm when "override level graphics" is on for the BD caves, magic walls have their own distinct look from normal walls, which i think ruins some levels where the presence of magic walls is supposed to be a secret. e.g. Achim Hoffman level 01:
secretmagicwalls.png
(there are probably better examples, but this is all i could remember.)
perhaps there could be a "show magic walls" option in the Game Engines setup menu.
I have changed R'n'D style BD graphics for the native BD engine so that normal wall and magic wall look the same, as this was indeed intended that way in the original game.

BTW: I have used eight animation frames (for the native BD engine's magic wall when activated) instead of four (for BD/EM style magic wall for the EM and R''n'D engines), and it looks so much better than their older counterparts. :o
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Tue Dec 03, 2024 6:26 pm strange bug i can't seem to reproduce: after a long session that included turning "Override Level Graphics" on and off a couple times, i tried to go to the level creator while on a BD level (specifically Achim Hofmann - Achim Hofmann level 01), and the "this level is read only!" notice for some reason was blurrily stretched to cover the entire game window. when i tried to dismiss it, it left streaks on the screen as it minimized, implying it failed to clear itself from the screen. here's a screenshot:
dismiss.png
(note that the window is 640x502 for some reason instead of 640x480 like it usually is when the BD graphics are active.)
i'm not sure what state the game was in. i was able to get the notice to "expand" again by pressing escape and enter, which might mean it went to the editor but still hadn't cleared the notice.
This really looks strange. Something must have been seriously broken during program execution. I am afraid that this is some sort of memory corruption bug (writing bytes into the wrong places in memory), which can be hard to debug. I have tried to find something suspicious using Valgrind, Address Sanitizer and static code analysis using cppcheck, but no luck so far. :(
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Tue Dec 03, 2024 7:13 pm this would break away from GDash, but it would be cool if eventually we could customize what elements can emerge from ghost explosions (like what happened with the gray ball in Mirror Magic). here's a mockup based on the default elements ghost explosions produce:

ghost_custom.png

(the "choice type" options are the same as for the gray ball in MM)
This is a great idea, and I really think that this should be added to the ghost element configuration page. I'll do that. :)
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Tue Dec 03, 2024 9:58 pm somehow after saving a level the player's snap element was changed to SP_TERMINAL. (i didn't notice any other unusual element config changes.) this is another one-off bug; it hasn't happened since and i'm not sure how to replicate it. this was during the same session as the "this level is read-only" notice taking up the entire screen.
Yes, this indeed looks like memory corruption or a memory integrity problem, too. And it will likely be hard to find the cause, I'm afraid, unless there is a way to reproduce this bad behavior. I will have to do some more test runs under memory debugging conditions. :-/
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Wed Dec 04, 2024 4:49 am the absence of rockford's distinctive "autsch" when he dies in BD-engine levels (when default RnD sounds are used) feels wrong
Yes, you're right. Finally added this one now!
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Wed Dec 04, 2024 5:18 am
ncrecc wrote: Tue Dec 03, 2024 1:17 am on windows 10 at least, the game crashes if it tries to play the BD "get extra life" sound when using the original RnD sounds.
should stress this is especially a problem when making levels in the level creator, where the "points until extra life" value is 500 by default with no way to change them - if you get 500 points while testing your level, and you haven't added custom sounds to your levelset (even if sfx is muted!), the game crashes
As mentioned, this bug is fixed now. :)
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Wed Dec 04, 2024 6:10 am smooth movement for rocks is buggy when conveyors and wraparound are involved
conveyorses.gif
(actually, the case with regular rocks looks alright, but the case with flying rocks definitely looks bugged)
It gets even worse when changing the conveyor belt's direction and pushing things in the opposite direction. :(

However, all fixed now! :)
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

ncrecc wrote: Wed Dec 04, 2024 3:52 pm normal rocks have animations when they're being pushed, but waiting rocks don't:

waitingrock.gif
Fixed!
User avatar
Holger
Site Admin
Posts: 4264
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by Holger »

BryanFRitt wrote: Sat Dec 07, 2024 11:11 pm BOULDER DASH > ACHMIN HAERTEL > CAVE 04
Crashed when finishing level
Just loading this tape that was saved before this crash using the shortcut from the MAIN menu causes a crash.[update: weird tried again, it didn't crash this time.] When loading tape via keyboard shortcut, after starting level, it looks like it's a bad tape, and not how I left it.

Code: Select all

Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x000055555576bdb9 in gd_sound_play (cave=0x0, sound=GD_S_BONUS_LIFE, element=O_NONE, x=32, y=18)
...
That's the crash bug as described by ncrecc, and it's fixed now.
Also, still have to be in 'TEAM' mode to play single player.
Using Debian Stable Linux, Debug compile of rocksndiamonds-4.4.0.0-test-4
Very strange. Could you please try if this also happens if you temporarily rename your ~/.rocksndiamonds/setup.conf file (that contains the setup settings), that is, test this case with all setup settings completely reset to defaults?

I have never encountered such strange behavior while test-playing all those BD style levels... :o
BryanFRitt
Posts: 253
Joined: Mon Nov 13, 2017 4:16 pm

Re: Pre-release 4 of Rocks'n'Diamonds 4.4.0.0 available!

Post by BryanFRitt »

That's the crash bug as described by ncrecc, and it's fixed now.
Thanks
Very strange. Could you please try if this also happens if you temporarily rename your ~/.rocksndiamonds/setup.conf file (that contains the setup settings), that is, test this case with all setup settings completely reset to defaults?

I have never encountered such strange behavior while test-playing all those BD style levels... :o
:) This seems to fix the required 'TEAMS' mode for single player. (but of course has a side effect of settings are back to default instead of whatever I had them at.)
--- Strike a balance between generating new things/ideas, and being good/organized. Pick somewhere between a gibberish mess and nothing said/done. ---
--- :) R'n'D core completed! :) ---
Post Reply