gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

News > Yahtzee for GBA

#33567 - krom - Wed Jan 05, 2005 3:53 pm

[Images not permitted - Click here to view it]
A portable version of Yahtzee has been released by Trey Arthur

I wrote a Yahtzee game for the GBA as a learning
exercise. The graphics aren't great and there is no
sound but the game is playable (at least I think so).


The Game includes the full source code for the HAM development kit.

You can download it straight from the main site!

#33734 - Trey - Fri Jan 07, 2005 9:13 pm

i just discovered a scoring bug. i have fixed it for the next version. it can easily be fixed by adding the line m_Score += 35; after the m_UpperScore line (see below). the game told you you got the bonus but it wasn't adding it to your score.

also, in the next version i have made the magenta die cursor box easier to see.

snip from Yahtzee.cpp
Code:

    // See if the upper score bonus of 35 pts should be awarded
    if ( Bonus() && m_ArmBonus ) {
        // Only add the bonus once per game
        m_ArmBonus = FALSE;

        m_UpperScore += 35;
    }
   
    // Add the current selection to the total score
    m_Score += score;