Page 10 of 13

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 8:09 am
by Agetian
Very nice, the ability to play a full BD game inside RnD (with multiple lives) is a very exciting development! No worries regarding the single life mode animation, it's awesome that you're planning to eventually integrate that as well :) RnD is quickly becoming the definitive way of experiencing GDash and GDash caves, especially on platforms that GDash itself doesn't support (notably, Android)

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 3:26 pm
by Agetian
A couple questions (or, rather, a question and a report) regarding version 4.4.0.1:

1. A minor thing, but it looks like sometimes (not always, but most of the time), during the final countdown and at the very end of it (when the final score is shown), the score will quickly "flash" between the last value and something else, almost as if dropping down to some other value for a fraction of a second and then going back to the final value. Noticed it on the original BD1 level set (from the GDash ones), as well as Firefox 01.

2. I'm playing the new multiple life mode, and this is something I'm not fully sure of yet, but it looks like the extra lives are not awarded at all at the moment? :/ Like, I played a few caves of the original Peter Liepa's BD1 from the GDash cave set, and I'm pretty sure that extra lives are every 500 points there (or maybe 1000, but I think 500), I played for a few caves in a row, earning over 2000 points in one go, and I haven't seen the "extra life flashing cave" animation even once, and I don't think I got any extra lives either. The only time I definitely got an extra life was when I reached the first intermission.

Hope these help and hope I'm on to something here :)

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 5:01 pm
by artsoft
1. A minor thing, but it looks like sometimes (not always, but most of the time), during the final countdown and at the very end of it (when the final score is shown), the score will quickly "flash" between the last value and something else, almost as if dropping down to some other value for a fraction of a second and then going back to the final value. Noticed it on the original BD1, as well as Firefox 01.
Tested with the first few levels of BD1, but so far I was unable to reproduce (or notice) it. Does the flashing occur when the score has already reached its final value, or during the countdown?
2. I'm playing the new multiple life mode, and this is something I'm not fully sure of yet, but it looks like the extra lives are not awarded at all at the moment? :/ Like, I played a few caves of the original Peter Liepa's BD1 from the GDash cave set, and I'm pretty sure that extra lives are every 500 points there (or maybe 1000, but I think 500), I played for a few caves in a row, earning over 2000 points in one go, and I haven't seen the "extra life flashing cave" animation even once, and I don't think I got any extra lives either. The only time I definitely got an extra life was when I reached the first intermission.
Gaining extra lives for non-intermission levels does not work in version 4.4.0.1 due to an embarrassing one-line bug. :oops:

Just fixed this bug and tested that everything works as it should now. Sorry that such a major bug made its way into the new release! :(

BTW: Extra scores are rewarded every 500 points, yes.

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 5:12 pm
by CWS
The multiple lives option for the Boulder Dash engine is just great!
It would be cool if playing could be continued by pressing the snap key or joystick button after losing a live.

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 5:12 pm
by Agetian
Nice, thanks for fixing it promptly! :)
As for the first issue, it's difficult to tell if it's when it reached its final value or right before it (since the countdown is so quick), but it happens at the very last moment - it seems to jump back and forth between whatever and the final value, and then almost immediately shows the final value. Doesn't always happen to me, but I can see it pretty consistently when playing Firefox 01 (every 2-3 caves or so). I'm on Linux, in case it matters (Linux Mint, current version).

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 5:25 pm
by Agetian
Just got in on the BD1 Atari (GDash) cave set: I played cave D and did not see it during the final countdown, then in happened on the next cave (cave E). I may be wrong, but it felt like it counted the final score to 319, then at the last possible moment, changed to something (maybe went down to 318 or something? It's impossible to actually catch), then jumped back to 319.

Interestingly, I tried to catch it on the video and I couldn't - like, I saw it happen in the game, but the video didn't register it, probably due to the difference in the frame rate (the relevant frame wasn't recorded). This confirms that it only happens for a split second (probably a frame or two).

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 7:16 pm
by artsoft
CWS wrote: Sun Jan 19, 2025 5:12 pm The multiple lives option for the Boulder Dash engine is just great!
Thanks! The next version (4.4.0.2) will have the bug with not gaining extra lives fixed. Hope to get it out soon!
It would be cool if playing could be continued by pressing the snap key or joystick button after losing a live.
Thought that it already worked that way, but apparently not! Will add that, too! :)

Re: Rocks'n'Diamonds with GDash game engine

Posted: Sun Jan 19, 2025 7:18 pm
by artsoft
Agetian wrote: Sun Jan 19, 2025 5:25 pm Just got in on the BD1 Atari (GDash) cave set: I played cave D and did not see it during the final countdown, then in happened on the next cave (cave E). I may be wrong, but it felt like it counted the final score to 319, then at the last possible moment, changed to something (maybe went down to 318 or something? It's impossible to actually catch), then jumped back to 319.
Hm, interesting. Could be some kind of miscalculation of the final score, counting down to the calculated (wrong) value, then updating the screen with the correct value one frame later. This is only a suspicion, but I will check that...

Re: Rocks'n'Diamonds with GDash game engine

Posted: Mon Jan 20, 2025 7:49 pm
by Agetian
artsoft wrote: Sun Jan 19, 2025 7:18 pm Hm, interesting. Could be some kind of miscalculation of the final score, counting down to the calculated (wrong) value, then updating the screen with the correct value one frame later. This is only a suspicion, but I will check that...
Hmm yeah, that could actually be the case, it could be that it merely calculates to the wrong value and then jumps to the correct one a frame later. Sadly, no way for me to test this :(

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Mon Jan 20, 2025 8:53 pm
by Agetian
By the way, can you please tell me what the one line fix for the extra lives is? I'd like to recompile the game with the patch applied, if it's not too much trouble :)

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Mon Jan 20, 2025 10:47 pm
by artsoft
By the way, can you please tell me what the one line fix for the extra lives is? I'd like to recompile the game with the patch applied, if it's not too much trouble :)
Not at all, here it is:

Code: Select all

commit b13ec8015f856a227512427b5d2307ff9cc18658
Author: Holger Schemel <info@artsoft.org>
Date:   Sun Jan 19 16:49:43 2025 +0100

    fixed adding extra life when playing BD games with multiple lives

diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c
index 791711e4..67a25f64 100644
--- a/src/game_bd/bd_gameplay.c
+++ b/src/game_bd/bd_gameplay.c
@@ -229,8 +229,8 @@ GdGame *gd_game_new(const int cave, const int level)
   game->cave_num = cave;
   game->level_num = level;

-  game->player_lives = gd_caveset_data->initial_lives;
-  game->player_score = 0;
+  game->player_lives = game_bd.global_lives;
+  game->player_score = game_bd.global_score;

   game->player_move = GD_MV_STILL;
   game->player_move_stick = FALSE;
It's actually two lines, but only the second one is really needed (while the other is merely for cosmetic purpose). :)

Re: Rocks'n'Diamonds with GDash game engine

Posted: Mon Jan 20, 2025 11:14 pm
by artsoft
... or use the latest stable version 4.4.0.2 just released a few minutes ago! :D

The new version contains the following hotfixes:
  • fixed adding extra life when playing BD games with multiple lives
  • fixed clearing touch buttons in off-screen areas on Android
  • fixed getting file size of BD caveset file inside Android APK file
  • fixed bad use of function pointers that was breaking Emscripten port
Download links in first post updated, or get it directly from the official R'n'D download page.

Re: Rocks'n'Diamonds with GDash game engine

Posted: Tue Jan 21, 2025 7:15 am
by Agetian
Nice, thanks a lot for releasing the hotfix version! Tested it a bit and, as usual, I have some new findings, hope you don't mind :D

First of all, I haven't noticed the "final score flickering" problem in this version (yet), I'll let you know if it happens again or if it has somehow magically fixed itself :) In fact, I played quite a lot of caves by now, so I can say pretty confidently that the issue does not manifest itself in this version.

Now, in this version, I noticed that the high scores are treated and saved differently compared to the previous version (I actually noticed it because I accidentally enabled saving to the high score server in this build). In 4.4.0.0 and 4.4.0.1, it seems like every level was still treated individually for the purpose of high scores (which, I believe, was actually the correct approach, it made it fair for everyone, especially on the high score server, so that high scores could still be seen for the level itself, even in a multi-life game). In 4.4.0.2, however, the high score is treated based on your current run, if you complete several caves in a row, you get incrementally higher high score for each cave (say, you beat 6 caves in a row, your high score for the 6th cave will be the total sum of scores you obtained in caves 1 through 6). I think I liked the previous approach more, where you accumulated the score correctly, but the high score was still separate for each cave. If this is the intended behavior, please remove my high scores for Peter Liepa's original BD1 from the high score server, since I accidentally saved a few scores that are way higher than would be possible for each of those caves on a separate basis :)

I guess this might be related to the change that was necessary to make the extra lives work. If you decide to switch back to the original approach for treating high scores, it's important that the extra lives don't end up being broken again - if I understand the code right, it might require the introduction of an extra variable separate from the current one(s) that will track the score obtained in the current level only for the purpose of the per-cave high score, but not be used for the purpose of tracking extra lives (so that the cumulative score can still be tracked for it). I might be completely wrong, but that's my impression of it :)

Hope this helps, and thank you very much for the BD engine in RnD again! :)

- Agetian

Re: Rocks'n'Diamonds with GDash game engine

Posted: Tue Jan 21, 2025 7:39 am
by CWS
You forgot adding the dig key to continue playing in the BD engine

Re: Rocks'n'Diamonds with GDash game engine

Posted: Tue Jan 21, 2025 11:43 am
by artsoft
Agetian wrote: Tue Jan 21, 2025 7:15 am Nice, thanks a lot for releasing the hotfix version! Tested it a bit and, as usual, I have some new findings, hope you don't mind :D
Not at all -- I am very happy about any feedback for new releases, especially problems, so I can fix them as soon as possible. :)
First of all, I haven't noticed the "final score flickering" problem in this version (yet), I'll let you know if it happens again or if it has somehow magically fixed itself :) In fact, I played quite a lot of caves by now, so I can say pretty confidently that the issue does not manifest itself in this version.
Good to know, although I am not aware of any code change that could have caused a change in behavior here.
Now, in this version, I noticed that the high scores are treated and saved differently compared to the previous version (I actually noticed it because I accidentally enabled saving to the high score server in this build). In 4.4.0.0 and 4.4.0.1, it seems like every level was still treated individually for the purpose of high scores (which, I believe, was actually the correct approach, it made it fair for everyone, especially on the high score server, so that high scores could still be seen for the level itself, even in a multi-life game). In 4.4.0.2, however, the high score is treated based on your current run, if you complete several caves in a row, you get incrementally higher high score for each cave (say, you beat 6 caves in a row, your high score for the 6th cave will be the total sum of scores you obtained in caves 1 through 6). I think I liked the previous approach more, where you accumulated the score correctly, but the high score was still separate for each cave. If this is the intended behavior, please remove my high scores for Peter Liepa's original BD1 from the high score server, since I accidentally saved a few scores that are way higher than would be possible for each of those caves on a separate basis :)

I guess this might be related to the change that was necessary to make the extra lives work. If you decide to switch back to the original approach for treating high scores, it's important that the extra lives don't end up being broken again - if I understand the code right, it might require the introduction of an extra variable separate from the current one(s) that will track the score obtained in the current level only for the purpose of the per-cave high score, but not be used for the purpose of tracking extra lives (so that the cumulative score can still be tracked for it). I might be completely wrong, but that's my impression of it :)
You are perfectly right, and the current behavior is not as it should be. In fact, there is already a separate variable for the single cave score (in addition to the multi-cave score). Before 4.4.0.2, both had the same value, so extra lives did not work. Now the "global score" works as it should, and extra lives work correctly. However, I use the global score instead of the cave score for the high score table by accident. I will fix this and release another hotfix version. (This time I will check that both extra lives and high scores work as intended. :roll: )

Regarding existing (wrong, because too high) scores on the high score server, there is no problem, fortunately. Each score tape is checked individually against the given score on the server, so any tape that results in a wrong (lower) score is simply treated as being invalid. Even better, I can set the score to "0" (as in "unknown") and re-run your tapes, so the score will be set to their correct values and will show up correctly in the hall of fame.

BTW: Any reason why you did not like to enable uploading scores to the high score server? I have tried hard to keep privacy protected as best as possible (like, not requiring accounts on the server, but only using the name pseudonyms chosen by the player for their scores). :)
Hope this helps, and thank you very much for the BD engine in RnD again! :)
Thanks for your instant bug report, which is very helpful! :)