Rockbox

  • Status Closed
  • Percent Complete
    100%
  • 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 Corey - 2008-05-26
Last edited by Adam Boot - 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  Adam Boot
2008-05-30 23:12
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in r17664

Bertrik Sikken commented on 2008-05-28 11:57

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

Adam Boot commented on 2008-05-28 19:39

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.

Corey commented on 2008-05-30 04:27

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

Adam:
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);
              break;

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.

Adam Boot commented on 2008-05-30 19:28

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing