Rocks'n'Diamonds with GDash game engine

Everything about the modern clones and remakes.

Moderator: Admin

Agetian
Member
Posts: 111
Joined: Sun Sep 19, 2021 10:14 am

Re: Rocks'n'Diamonds with GDash game engine

Post by Agetian »

CWS wrote: Sat Dec 28, 2024 3:29 pm I also think that with the Boulder Dash engine there should be 3 lifes. Not endless tries.
In my opinion, there are two possible things that can eventually be done here (at least it's just my $0.02 for the brainstorm) :)
Having an option to play a traditional 3 life-based game of BD in RnD eventually would definitely be nice, though I understand it may be difficult to implement this since the overall RnD framework isn't geared for this kind of play (at least I do see and understand the possible complications).
So, alternatively, it might be nice to adopt the approach that's used in Krissz's BD engine - namely, stick to one attempt (one life), as it is in RnD already, but repurpose the flashing cave effect to indicate that you beat the current high score (as opposed to obtaining enough points for a life), that would make more sense in RnD context imo. In Krissz's engine, this effect is shown (and the relevant sound plays) as you are playing the cave as soon as your points exceed the current high score (if there is one).

- Agetian
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

CWS wrote: Fri Dec 27, 2024 8:56 pm
artsoft wrote: Fri Dec 27, 2024 4:39 pm
CWS wrote: Fri Dec 27, 2024 2:09 pm Just play the cave "Around the clock" of my CWS Boulder Dash 3 with 60 fps vsync in GDash and in R'n'D. It's included in R'n'D. You will see for yourself.
Thanks! I already did some testing, could not find something suspicious so far. However, choosing "normal speed" or "fast speed" (as required for 60 Hz VSync) should not make a difference game engine wise -- it's just playing faster (which makes things harder than with normal speed, of course).
It's like I already wrote: set both games GDash and RnD to 60 hz vsync. In GDash the first clock can be reached in that cave, in RnD the time seems to run a little bit faster and the clock can't be reached. In 50 fps it's working, of course. And I know that game runs faster in 60 Hz - I only want to point out that GDash seems to have a different timer for 60 Hz than RnD.
As said, using VSync (and therefore 60 fps engine speed) in R'n'D does not affect the game engine with regard to levels being technically solvable or not -- it's just harder to play, as the whole level has to be played with higher speed than with 50 fps engine speed. That is, you need faster reactions than when played with a slower game engine speed, which makes it harder or even impossible (depending on your reactions and/or skills) to solve a level.

I have tested your level mentioned above, and the first clock can "easily" be reached (engine-wise, not necessarily player-wise, as you have to be fast enough, of course). Have a look at the solution tape in the "hall of fame", which was recorded with VSync and 60 fps active (which you can replay in any speed, which does not affect the game engine).

BTW: Is there a way to enable or disable 60 Hz VSync in GDash (speaking of version 1.9.15 here)? As far as I can tell, VSync is always activated. Which sort of makes sense, as engine speed and screen updates are independent (asynchronous) in GDash (which does not lead to visibly jerky player movement here, as GDash does not use smooth game element movement anyway, which would look nasty with game engine and screen updates using different fps).

BTW2: As far as I can tell, the game engine in GDash is running a little bit too slow, which can easily be checked when looking at the time counter in the game panel during the game. And no, I am not speaking about PAL timing here. Without PAL timing, 60 seconds in the game should take 60 seconds in reality. With PAL timing, 50 seconds in the game should take 60 seconds in reality (that is, the engine is running slower, by intention). In GDash (playing a level with PAL timing), 42 seconds in the game take 60 seconds in reality, which is too slow. (All measurements done using milliseconds engine scheduling.) This might explain that you think R'n'D is running too fast. ;-)
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

I have updated the GDash level package for R'n'D with the following additions:
  • added new level set "Dustin's Boulder Dash 24"
  • added new graphics set "Boulder Rush by CWS"
Have fun! And a happy new year to all of you! :D
User avatar
CWS
Member
Posts: 453
Joined: Wed Jul 11, 2007 2:32 pm
Location: Austria - Europe

Re: Rocks'n'Diamonds with GDash game engine

Post by CWS »

In GDash you can change the option "PAL-Timing" for each cave. Just open a cave in the editor and open the settings for it.

There is no specific setting for PAL or NTSC (yet).

50 fps can only be used with GTK+ or SDL but I think this is related to the "PAL-Timing" checked for each cave. 60 fps is only possible with OpenGL (for smooth scrolling you additionally have to activate Force OpenGL Renderer in settings).
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

CWS wrote: Tue Dec 31, 2024 4:32 pm In GDash you can change the option "PAL-Timing" for each cave. Just open a cave in the editor and open the settings for it.
Yes, I know. You can do the same in the R'n'D level editor, under "CONF -> Engine" settings.
There is no specific setting for PAL or NTSC (yet).
Not sure what you mean here -- NTSC timing is just PAL timing deactivated, isn't it?
50 fps can only be used with GTK+ or SDL but I think this is related to the "PAL-Timing" checked for each cave. 60 fps is only possible with OpenGL (for smooth scrolling you additionally have to activate Force OpenGL Renderer in settings).
Thanks! I was not aware of this setting! Using "Force OpenGL Renderer", GDash has indeed correct timing as measured above.
User avatar
CWS
Member
Posts: 453
Joined: Wed Jul 11, 2007 2:32 pm
Location: Austria - Europe

Re: Rocks'n'Diamonds with GDash game engine

Post by CWS »

I do not fully understand the reason why i is that way on GDash but it works that way. I think the option Force Renderer results in 60 fps. You can always mail the author of the latest GDash fork, he’s a nice guy from Germany…
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

I do not fully understand the reason why i is that way on GDash but it works that way. I think the option Force Renderer results in 60 fps. You can always mail the author of the latest GDash fork, he’s a nice guy from Germany…
That's good to know, and you are right that it would probably be a good idea to contact him, so we could maybe coordinate our actions regarding GDash and R'n'D with GDash engine on the one hand, and the large cave set package on the other hand (which I currently try to keep in sync with the latest GDash fork for easy maintenance).

Regarding renderer settings in GDash, I had a closer look at the source code of the latest GDash version yesterday, and it works as follows:

Regarding graphics engine settings: Both "SDL" and "OpenGL" use SDL for creating the game window, but "OpenGL" adds the "SDL_WINDOW_OPENGL" flag and uses OpenGL directly (using all those "SDL_GL_Whatever()" functions that SDL offers), while "SDL" creates a window using whatever graphics subsystem the SDL library (or the operating systems) thinks that should be used.

Only when selecting "Force OpenGL Renderer" while using the "OpenGL" graphics engine at the same time, a renderer using OpenGL with the flags "SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC" will be used (with the latter flag enforcing VSync to be used), which is indeed not the case by default.

(Interestingly, when using the "SDL" graphics engine, "SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC" is always used, but has no effect unless OpenGL is used, which is *not* the default graphics engine on most systems.)

So, it would be a little bit more clear to rename the "Force OpenGL renderer" option (which only has an effect when selecting the "OpenGL" graphics engine) to "Use VSync for OpenGL" or something like that, which should result in 60 fps on most monitors.

But it is indeed a bit unfortunate that you get wrong engine speed in GDash unless you enable VSync with 60 Hz / 60 fps, which is not necessarily supported by all systems (although you should get OpenGL on most systems via SDL nowadays).
User avatar
CWS
Member
Posts: 453
Joined: Wed Jul 11, 2007 2:32 pm
Location: Austria - Europe

Re: Rocks'n'Diamonds with GDash game engine

Post by CWS »

Very interesting!

I think it’s a bit uncertain what Apple does with OpenGL, it would certainly be better to implement something like bgfx…
Agetian
Member
Posts: 111
Joined: Sun Sep 19, 2021 10:14 am

Re: Rocks'n'Diamonds with GDash game engine

Post by Agetian »

After playing some more with the RnD BD engine, I'm quite confident that it would be a nice option to have the "flashing cave" animation (currently used as extra life bonus animation) signify beating the current high score, a la Krissz engine :) At least, it could be an option, possibly even enabled by default in RnD because it makes the most sense, but with the possibility of turning it off for someone who would want it to be GDash-authentic in the sense that it shows earning enough points for an extra life (even if extra lives mean nothing in RnD context). What do you think?

- Agetian
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

Interesting idea, but how does the game know if you have beaten the current high score for a cave before the cave is completely finished? Sure, if you have a higher score than the current high score at a given time during the game, things are clear. But in most cases, the extra score for the remaining time after finishing a cave will make the difference if you have beaten the current high score or not, or am I wrong? Maybe I have overseen something here? How does the Krissz engine handle this?

Regarding the "extra life flashing" in R'n'D: Starting with R'n'D 4.4.0.1, there will be an option to play all BD levels just like in GDash, that is, with multiple lives, so that the flashing animation will make sense again. It already works just fine in my current working version, and I will release the new version soon. :)

But yes, if the "play with multiple lives" option is disabled, I could use the flashing animation as you have described. :)
Agetian
Member
Posts: 111
Joined: Sun Sep 19, 2021 10:14 am

Re: Rocks'n'Diamonds with GDash game engine

Post by Agetian »

Oh, that's a really exciting development, that sounds awesome! Being able to play the game both classic BD-style with multiple lives and RnD-style on a per-cave basis is really great! Best of luck, can't wait to play this new version! :)

Here's how Krissz's engine handles the high score flashing animation:
1. If there's no current high score at all (e.g. the cave hasn't yet been completed at all), the animation is not used.
2. If there is an existing high score, the flashing animation will occur as soon as the high score is beaten (the current score becomes greater than the high score, regardless of the circumstances). So:
2.1. If the high score is beaten during the game, the flashing animation is played immediately (as the cave is played), as soon as the high score is surpassed. This is regardless of whether the high score will hold (e.g. in some caves where you get negative score for time, you may end up not actually having the high score after the final countdown - however, this is irrelevant, and the flashing animation is played the first time the high score is surpassed, regardless of any future possibilities).
2.2. If the high score is beaten during the final countdown (e.g. the cave is completed, and high score is surpassed while the final countdown for the timer is performed), the flashing animation is also played immediately as soon as the current score surpasses the high score during the countdown.

Hope this helps :)

- Agetian
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

Thanks a lot for your detailed explanation, Agetian! Yes, that makes sense!

I think I should solve it exactly as you have described it! And this could then be the default behavior for the case of not playing with multiple lives, as the flashing animation has no real other value in this case, just as you have written. :)
Agetian
Member
Posts: 111
Joined: Sun Sep 19, 2021 10:14 am

Re: Rocks'n'Diamonds with GDash game engine

Post by Agetian »

Nice, that sounds like a very good solution to me! :)

- Agetian
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

I have just released a new patch version of Rocks'n'Diamonds with BD engine (version 4.4.0.1) which contains various additions, changes and fixes for playing caves with the BD engine:

* added support for playing BD games with multiple lives and global score
* added support for showing multiple lives for BD games in game panel
* added support for showing level set name in game panel
* added setup option to save tape without asking
* added support for animated BD player with bomb or rocket launcher
* added improved (un)covering of screen when using BD game engine
* fixed black screen flickering when using Metal render driver on Mac
* fixed bug with looping death sound when killed by voodoo in BD engine
* fixed drawing crumbled graphics when moving diagonally in BD engine
* fixed playing sounds for levels with small playfield in BD engine
* fixed showing level story when playing without hall of fame after game
* fixed multi-line request text overlapping with request buttons

You can read the full announcement here. I have also updated all download links in the first post of this thread, as usual.

Please make sure to also update the GDash level package to match certain changes in the latest R'n'D version.

There are many additions especially for those who prefer playing BD caves in GDash style, that is, without interruptions by request dialogs or scores screens (by simply disabling them in the setup menu to your own liking), and with multiple lives and scores for more than one level (which are, however, not stored in the hall of fame, which is still per-level only, as it is currently impossible to verify a score that spans over more than one level). Playing with multiple lives is disabled by default, but can easily be enabled in the "game engines" section of the setup menu.

I hope you have fun with this updated version of the game! :)
Last edited by artsoft on Sat Jan 18, 2025 10:44 pm, edited 7 times in total.
artsoft
Member
Posts: 107
Joined: Tue Dec 09, 2014 8:26 pm
Contact:

Re: Rocks'n'Diamonds with GDash game engine

Post by artsoft »

P.S.: Agetian, the "flashing cave" animation for single player mode (to indicate a new high score, as described above) is not yet available in version 4.4.0.1, but I hope to be able to add it soon. :)
Post Reply