The Game of Pig

Assignment:

Create a Scratch project for the two player Game of Pig.

Instructions:

Pig is a simple game played with a six sided die.  Two players race to reach 100 points and win the game.

Give your game a style all its own.  Mostly use custom sprites you draw or import from images you edit.  Provide some animation with movement and/or costume changes to show the random selection of the “dice rolls.”

Spelling and presentation count:  your game should make sense and be fun to play.  Reward players with encouraging feedback.

 

Minimum Requirements:

The rules of Pig are simple: two players race to reach 100 points. Each turn, a player repeatedly rolls a six sided die until either a 1 is rolled or the player holds and scores the sum of the rolls (i.e. the turn total). At any time during a player’s turn, the player is faced with two decisions:

  • roll – If the player rolls a
    • 1: the player scores nothing and it becomes the opponent’s turn.
    • 2 – 6: the number is added to the player’s turn total and the player’s turn continues.
  • hold – The turn total is added to the player’s score and it becomes the opponent’s turn.

At a minimum, your project should allow two humans to play each other.

In general, this should be a polished game with significant attention to detail.

Use at least three different sound effects for different events in the game.

Each time a player “rolls the die” in your game, show the selection of the random number from 1 to 6 as an animation using sprite costume changes, ending with the display of the specific random result for the player’s “roll”.  You can show a six-sided die rolling as it would in real life, or you can use some other visual metaphor for selecting a number.  Your game does not really have to include a six sided die, the important part is for it to randomly pick a number from 1 – 6.  Here are some other ideas for showing the selection of a random number:  a slot machine-ish display with rolling wheels of different numbers, flipping analog cards showing numbers like an old alarm clock, a jumble of numbered balls in a sphere with one popping out as in lottery selections.

Use at least three custom sprites.

All spelling and grammar must be correct.

Your game should have a theme song playing in the background, with a different song playing at the end when the winner is congratulated.

Provide feedback to the player when important events happen.  For example, if the player is pushing their luck on rolling a 1 after several successful roles, tell them they are a very bold player.  When they roll a 1 and bust out, console them.  When someone has a high-scoring turn, congratulate them.  When the game is almost over, provide a warning.  Etcetera.

Additional features to exceed expectations:

 

Add support for a single human player to play against the computer.  You will need to program the computer opponent to play by a set of rules or algorithms you define.  A simple approach is to just hold at a certain number.

Add support for a difficulty level of the computer opponent.  You can have the computer use different rules for different difficulty levels, or introduce random decision making at lower difficulty levels to increase the likelihood the computer opponent will perform poorly.

Test and improve the algorithms or rules of your computer opponent.  Make a version of your project that is only for the purpose of testing one set of rules for the computer opponent against another.  Remove the visual and audio elements of your game so you are just testing the performance of one computer player against another.  Run tests over 100 or more games.  Use the results to improve the rules used by the computer opponent in your game.