Author Topic: Everything You Ever Wanted to Know About the 1M Rollover and HIGH SCORE Freeze  (Read 2877 times)

0 Members and 1 Guest are viewing this topic.

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1763
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Due to a naive but understandable lack of foresight on the part of the programming team, DK only set aside 3 bytes, enough for six digits, to display the player's score. As a consequence, once we hit 1 million, the "odometer" under 1UP (or 2UP) flips back to all zeros.

However, as we've all seen, the number displayed under HIGH SCORE freezes near the million mark, without rolling back to zero, and remains frozen for the remainder of the game.

How, and with what specific dynamics, does this occur?

I did some research and testing on this topic, and haven't seen it discussed elsewhere, and I know it might be something that some people find vexing when they see it, so I figured I might as well make a thread to toss it into the knowledge base and satisfy any curiosity.

WHAT "HIGH SCORE" ACTUALLY DOES

After every point-award, the program polls the active player's current score for whether or not it is larger than the stored HIGH SCORE value. If and when this check returns true, the value is copied over and displayed under HIGH SCORE.

When the player's score reaches one million, his score continues counting without a hitch, but it starts over at 000000.

This is where the HIGH SCORE freezes. It happens because, unlike the player's score, the HIGH SCORE value is not one that is itself added to, but rather a value that merely echoes the player's score, should that score be higher than the currently-stored value.

Once the player has rolled to all zeros, the check for a higher score than the stored HIGH SCORE value returns false, because, numerically, the player's score is now lower. So it is not echoed.

But why does HIGH SCORE only sometimes, maybe even rarely, lock up at exactly 999,900, while instead sticking on strange, seemingly arbitrary values like 998,600?

AWARDING POINTS

The answer comes down to the point-awarding routines. While the result of a point award is shown onscreen all at once, the internal calculation for an award greater than 1,000 points actually happens in TWO steps.

Step one adds the hundreds. Step two adds the thousands.

Example: an award of 2,800 to a score of 100,700 will, in step one, add the 800 to the 100,700, bringing the score to 101,500. In step 2, 2,000 points are added, bringing the score to 103,500. Onscreen of course, the score jumps directly from 100,700 to 103,500 and there's no hint that the addition was actually done in two steps.

When the player's score reaches 1 million, the HIGH SCORE value will lock up in accord with this two-step process.

Examples of the players score + a point award, and where it will end up freezing the HIGH SCORE:

1. 999,800 + 300 = 999,800
(300 pushes the player's score from 999,800 to 000,100)
2. 999,400 + 1,300 = 999,700
(The 300 is added first, so 999,400 becomes 999,700. The 1,000, added second, pushes the player's score to 000,700)
3. 996,600 + 5,500 = 997,100
(A little harder to see at first. 500 is added to 996,600, bringing the score to 997,100. The next step, adding 5,000, pushes the player's score to 002,100, therefore the HIGH SCORE stays put at 997,100).

So, if you're at 999,500 and you get an 800 point hammer smash, your score will read 000,300, but HIGH SCORE will stay locked at 999,500 for the remainder of the game, and indeed until the machine is power-cycled, with one exception: playing a subsequent game, and achieving a point-award that lands in that 400-point range between 999,600 and 999,900, will lock in the new value.

A SILLY QUIZ

Now that you're an expert on the phenomenon of the famous HIGH SCORE lockup, let's waste some more time with a pop quiz! (This, however, is just as much a test of your knowledge of the game as it is of what I just discussed.)

1. What is the lowest possible number at which we can get the HIGH SCORE to freeze during the actual play of a board (that is, not from a timer bonus following the board's completion)?

2. What is the lowest possible number at which we can get the HIGH SCORE to freeze upon the awarding of a timer bonus? For this, assume a timer bonus that is achievable under actual game conditions (ie, no floor-skips, invincibility, or "finish this level now" cheats).

3. What is the lowest score that the player can have such that the highest-achievable timer bonus will roll his score to exactly 000000? What is the exact amount of that timer bonus? Which of the four board-types is it achievable on?

Apologies for any issues with the comprehensibility of these questions. Phrasing them clearly is probably more challenging than answering them!

First correct reponse wins nothing. :)
http://donkeykongblog.blogspot.com

4 Quarters :-* - 800K Avg. Per Qtr. :o - No Restarts 8) - No Proof :'(

7/26/2013   Coin 35,946   710,800   18-1
7/28/2013   Coin 35,947   903,700   22-1
8/16/2013   Coin 35,948   694,100   17-6
8/17/2013   Coin 35,949   893,100   22-1

3,201,700: the $1 World Record?
Member for 11 Years DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

Offline Sock Master

  • Elite Member
  • *
  • Posts: 378
    • Awards
Quiz guesses

1. 999300?

2&3. I gather this would have to take place on an elevator board or maybe cement board..whichever one of those can be completed with a higher timer, but I'm not sure what the highest possible timer value at finish is.


The game is just full of funky programming.  Although it sets and tallies 6 digit scores, using 3 bytes (two HEX digits per byte in binary coded decimal), the last two digits are always zeros and therefore wasted.   The scores are effectively only using 2 bytes/4 digits.... except for the default high scores, which are preprogammed with scores ending in 50s, which can never actually happen in-game.

I just finished adding 7 digit scoring to DKRemix and I took the lazy route.  I just downshifted all scoring (internally) by 10,  so 100 becomes 10, 300 becomes 30, etc...   And when scores get displayed, I just then added a trailing zero to all displayed scores.   That way it's still 3 bytes for 9999900 points. 
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 8 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Online stella_blue

  • High Score Moderator
  • Spring Jumper
  • *
  • Posts: 1529
    • Awards
1. What is the lowest possible number at which we can get the HIGH SCORE to freeze during the actual play of a board (that is, not from a timer bonus following the board's completion)?

999,200

2. What is the lowest possible number at which we can get the HIGH SCORE to freeze upon the awarding of a timer bonus? For this, assume a timer bonus that is achievable under actual game conditions (ie, no floor-skips, invincibility, or "finish this level now" cheats).

993,000

3. What is the lowest score that the player can have such that the highest-achievable timer bonus will roll his score to exactly 000000? What is the exact amount of that timer bonus? Which of the four board-types is it achievable on?

992,800;  7200;  Pie Factory

My answers to #2 and #3 are really just my best guess, based on the same scenario:  the rarely attempted free pass on the left side of the conveyor stage.

DK High Score 
1,064,500
  (L22-1)
DK Level 1-1 
13,400
DK No Hammer 
535,300
  (L15-2)
Member for 11 Years Most Time Online DK 1M Point Scorer DK Killscreener Blogger Twitch Streamer