• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Games
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by EMonk - 2008-05-26
Last edited by rotator - 2008-05-30

FS#9041 - Jewels - Score cleared on level change

When changing to a new level on Jewels the scored is cleared to the base for the level immediately after re-filling the board and before checking for 3+ groupings in the new board.

While not normally an issue, it is possible to have a multi-drop or 4+ group which brings the score above the next 100-point level threshold. Any points gained which exceed the 100-point level are discarded. The worst case I have had is an 8-point set bringing my score to 307, which was reset to 300 after level change.

Closed by  rotator
2008-05-30 23:12
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixed in r17664

I think this can be changed reasonably easy, but is this really a bug? AFAIK this game is a port of which apparently behaves like this.
Is the current scoring method different from other jewel-like games?

You must be playing in puzzle mode, because in regular mode the points *do* roll over. This looks quite intentional to me as total points are really rather irrelevant in puzzle mode, only the level number matters.

I’ll close this task if you don’t have any objections.

EMonk commented on 2008-05-30 04:27

If it’s by design, no worries… except I feel slightly disappointed when it happens :)

I don’t play in Puzzle mode, so I have no comment on point rollover there. In normal game mode however it *does* clear the points.

I’ve just had my first look at the source and I think I’ve found the culprit near the bottom of the jewels_main loop in the following lines:

          case GAME_TYPE_NORMAL:
              if(bj->score >= LEVEL_PTS) bj->score = jewels_nextlevel(bj);

Now, presuming that bj→level = 1 and bj→score = 103 prior to this point, immediately after jewels_nextlevel returns but prior to the assignment bj→level = 2 and bj→score = 3, which is correct. Unfortunately bj→score is then overwritten by the assignment which replaces it with the points gained from any drops that happened in the new board only. If we assume that no valid drops were generated by the newly added jewels during jewels_initlevel, then return from jewels_nextlevel will be 0 and player’s total score will be (bj→level-1)*LEVEL_PTS+bj→score = 200.

Simplest fix might be to change the above to read “… bj→score += jewels_nextlevel(bj);” or similar.

Ah, I think I see what you’re talking about and it does look like a bug. It’s a bit different than what I originally thought based on your description, I can have a quick fix for it as soon as I get some time.


Available keyboard shortcuts


Task Details

Task Editing