Yatzy Dice Game

Yatzy Dice Game is a game where the player rolls five dice to attempt to make different combinations.  After each roll, the player can hold the value of any of the die by clicking on them.  A saved die turns yellow when its value is held.  After three rolls, the player must choose one of the available categories to apply the score.  After all of the categories are completed, the game is over.

Scoring Categories

Aces – Sum of all the dice showing value value of 1.

Twos – Sum of all the dice showing value value of 2.

Threes – Sum of all the dice showing value value of 3.

Fours – Sum of all the dice showing value value of 4.

Fives – Sum of all the dice showing value value of 5.

Sixes – Sum of all the dice showing value value of 6.

Bonus for getting over 63 points in all of the above categories.

One Pair – Two dice have a matching value.

Two Pairs – Four dice have two different matching values

Three of a Kind – Three dice have the same value

Four of a Kind – Four dice have the same value.

Small Straight – Dice have the values 1 through 5.

Large Straight – Dice have the values 2 through 6.

Chance – Sum of all dice values.  Basically, choose this if no other category applies.

Full House – Three dice have one value and two dice have another value.

Yatzy – All five dice have the same value.

Calculating the rolled dice value

Below is the code used for determining which value rolled, based on the transform rotation of the Unity GameObject.  This assumes that the die is modeled with 4 on top, 3 on bottom, 2 on front, 5 on back, 1 on left, and 6 on right.

    public int getValue () {
        int iValue = -1;
        Vector3 dieRotation = gameObject.transform.eulerAngles;

        dieRotation = new Vector3 (Mathf.RoundToInt (dieRotation.x), Mathf.RoundToInt (dieRotation.y), Mathf.RoundToInt (dieRotation.z));

        if (dieRotation.x == 180 && dieRotation.y == 270 ||
            dieRotation.x == 0 && dieRotation.z == 90) {
            iValue = 1;
        } else if (dieRotation.x == 270) {
            iValue = 2;
        } else if (dieRotation.x == 180 && dieRotation.z == 0 ||
            dieRotation.x == 0 && dieRotation.z == 180) {
            iValue = 3;
        } else if (dieRotation.x == 180 && dieRotation.z == 180 ||
            dieRotation.x == 0 && dieRotation.z == 0) {
            iValue = 4;
        } else if (dieRotation.x == 90) {
            iValue = 5;
        } else if (dieRotation.x == 0 && dieRotation.z == 270 ||
            dieRotation.x == 180 && dieRotation.z == 90) {
            iValue = 6;
        }

        //        Debug.Log("eulerAngles: " + dieRotation.x + ", " + dieRotation.y + ", " + dieRotation.z + " Value: " + iValue);

        return iValue;
    }

 

 


Created by Levi D. Smith
Released
Built with: Unity

Yen Master

Vanquish the demons to become the one true Yen Master! Collect yen to buy powerups, but be careful because the game is over once your yen goes down to zero. Enemy demons and their projectiles will drain your yen.

Powerups

  • Move Speed (cost 25 yen) – Makes the Yen Master move more quickly. Can upgrade three times.
  • Fire Rate (cost 50 yen) – Increases the frequency that the Yen Master can shoot fireballs. Can upgrade three times.
  • Orb (cost 100 yen) – Summon an orb by your side to shoot additional fireballs (maximum 2). Beware, if an orb is hit by an enemy or projectile it is destroyed (no refunds!)
  • Coin Magnet (cost 75 yen) – Coins are pulled toward the Yen Master. Can upgrade three times, and higher levels increases the magnet range.

Enemies

  • Peon Demon (gray) – Moves horizontally, and drops 1 yen
  • Circle Demon (blue) – Moves in a circular pattern, and drops 5 yen
  • Fire Demon (yellow) – Move vertically and shoot projectiles at the Yen Master
  • Boss Demon (purple) – Largest demon that shoots projectiles from his eyes. Takes multiple shots to defeat. Drops 100 yen

 


Created by Levi D. Smith
Released
Built with: Unity

Domino Game

Domino game is a fully functional domino game that follows draw domino rules.  Various options have been added to the game.

The domino game allows between two and four players.  One of those players can be controlled, or all players can be controlled by the computer opponents.

The game is played in rounds, where the player to use all of the dominos in their hand wins the game.  The winner is awarded the value of the dominos in all other player hands.  The number of points to win is set before the game, which can be 50, 100, 150, or 200.

There are four playfields in the game, which are the table, grass, tree stump, and sidewalk.  A random option is also available, which randomly picks a playfield after every round.

The domino colors available are black, white, and red.  The color of the pits can also be selected from black, white, and multi-colored.

 

 


Created by Levi D. Smith
Released
Built with: Unity