Wrong score calculation for remaining time in EMC / EM engine (and by the way, in DC2)

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

Moderators: Flumminator, Zomis

Post Reply
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Wrong score calculation for remaining time in EMC / EM engine (and by the way, in DC2)

Post by mat »

The mechanism of calculation of additional points differs between original EM and EM engine in RND. Have a look at the video below (first level is enough):

https://youtu.be/fxaZkMW8454

When a fellow goes into an exit, their's final score is 725 and remaining time is about 107 - 108 seconds. If you want to run over the game process in RND, you will get completely different score (higher than 3-digit - look at Hall of fame). Certainly you don't receive the given score for each 1 second left. At first, I thought of full 10 seconds, because DC2 works that way. But I guess I was not right. Believed in RND (Holger ;)), the first level has bonus score set to 48 points. The guy from YT gets additional 325 points with remaining time about 108 seconds so as you can see, there is other formula calculating the score. And there aren't any animations of that calculation as opposed to RND.

It seems that the problem may also cover other EMC levelgroups...
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Wrong score calculation for remaining time in EMC / EM engine (and by the way, in DC2)

Post by Holger »

The mechanism of calculation of additional points differs between original EM and EM engine in RND.
You're right! This was caused by the original code of the native Emerald Mine engine counting time differently than in R'n'D (plus calculating score for all game engines the same way, although it differs between different engines).

Thanks a lot for drawing my attention to this issue!
At first, I thought of full 10 seconds, because DC2 works that way. But I guess I was not right. Believed in RND (Holger ;)), the first level has bonus score set to 48 points.
You were right. The "real" time bonus (or exit score) for this level is 30, but was re-calculated to 48 when loading the native level to fit the time score calculation scheme of the original code of the game engine (while R'n'D uses the unmodified time score value).
The guy from YT gets additional 325 points with remaining time about 108 seconds
So, using "30 points for 10 seconds", 325 points for ~108 seconds looks correct (as the original engine code internally does not use seconds, but multiples of eight game frames, which is less than one second, the result can be slightly different than the expected result of 324).

I have fixed this for the next version (patch release), both for native Emerald Mine levels and native Diamond Caves levels, and added a new selectbox to the level editor to show/enter if the time score should be given per seconds left or per 10 seconds left.

An even better sub-second time score calculation (which would be possible using the internal frame counter) is left as an exercise to the programmer... ;-)
And there aren't any animations of that calculation as opposed to RND.
Yes, that's right. The original game immediately shows the final score, and then continues counting down the remaining time (including the now meaningless "time out" bells during the last ten seconds), waiting for the player to press the fire button when the level time has reached zero.

Do you think I should add an option to emulate this behaviour?

(This could be a setup option or even a directive for the artwork set config file to force it independently from setup options. But I think a setup option might be the better choice here. The same could be done for a button or key press required to go on after the game was won or lost, maybe. This would also solve the problem of envelope requests immediately after the game covering parts of the visible playfield, which could be seen as undesirable if one prefers to see what's going on on the playfield after the player has won or lost the game...)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Wrong score calculation for remaining time in EMC / EM engine (and by the way, in DC2)

Post by Holger »

An even better sub-second time score calculation (which would be possible using the internal frame counter) is left as an exercise to the programmer... ;-)
OK, added that, too. :)
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Re: Wrong score calculation for remaining time in EMC / EM engine (and by the way, in DC2)

Post by mat »

Do you think I should add an option to emulate this behaviour?

This could be a setup option or even a directive for the artwork set config file to force it independently from setup options. But I think a setup option might be the better choice here.
In the beginning, I would like to give an opinion about the immediate showing the final score (without extra counting down of time etc.).

You can combine these two features :) You might add an option that would be switched between yes, no and auto. auto means "look for that setting in conf and apply it". If not found, the default value could be no (don't calculate the score at once).

The counting down of time and waiting for pressing the button may be a separate feature dedicated only for EM-engine levels.

That's the way I see it :)
Post Reply