Assignments

=Scratch Programming= ... a visual programming language toc [|Intro video] Lessons [|Download Scratch]. It's free, but make sure you download the right one: Windows or MAC.

Do you have questions?

Post them in the [|Discussion forum].

 =Scratch Projects= Before creating a game, make sure you
 * 1) explore Scratch (about 3 to 4 classes)
 * 2) discuss possible game projects with others with similar interests



Single-player adventure game - RPG
Design a game where the player lands randomly in **xxxx** (haunted house, house of mirrors, your house, fantasy world, shopping mall, school, caves, space, frontier, maze). The object of the game is to get **somewhere** out of **xxxx** safely.


 * In the game** the user
 * Encounters random **hazards** (monsters, hole in the ground, bats, falling rocks, ..) as they wander around the 3 to 9 **scenes** in **xxxx** that suit your game.
 * Must **defend** against the hazard (by fighting, eating, escaping, negotiating by answering questions, for example) in order to move towards safety
 * Must have three (or more, maybe 9) **lives/tries** to accomplish their goal
 * Must progress through three levels of difficulty to win
 * Is able to **win the game** with the right strategy.

Rating: Teen (tasteful, please) or 6 to 8 year old

Download the Scratch game template: See example here



Two-player combat game
Design a game where two players each control a sprite. The object of the game is to reduce the opponent's lives to zero.


 * In the game each player**
 * Has separate controls for motion (right, left, up, down) and attack (punch, kick, ...)
 * has at least two costumes: attacking & hurting
 * grunts or screams or ... when attacked

For each player
 * Enhancements**
 * Start out with three lives. Each life starts with 100 health points
 * lose health points when hit
 * lose a life when health points becomes zero
 * change scenes periodically
 * change difficulty level as time progresses and no lives are lost

For the game
 * have multiple levels
 * change scenes as a player moves to the edge. Don't forget to reposition the sprites.
 * have secret hazards (like a trap door) that both players encounter and must avoid. Use your imagination. What happens if either player touches the trap door? ... Ooooh ....

 =Phases to solve the problem=

Phase 1 The Concept Stage
Larger projects than this require more detailed Planning
 * 1) Plan together, but design & write scripts separately.
 * 2) In groups of 1, 2, or 3 discuss each other's ideas and provide feedback.
 * 3) Keep track of your ideas along with feedback from your classmates.
 * 4) If you wish, post your concept in the class discussion page. Respond to each others' ideas.

Phase 2 Learn the Skills needed for your game
See below S1 to S5.

Phase 3 Build your game
Put your skills together to create your game.

Phase 4 Beta Testing your game
Drag a copy of your game into the hand in folder. Test each others games. Your teacher will assign a game for you to evaluate in more detail. Post your critique.

Phase 5 Upload your game
Contribute your final game to the Scratch community.

=Examples= 

RPG

 * The secret passage**

//Phase 1// Your sprite is in a cave deep underground. There appears to be a dead end with no way out except the way you came in. However, your tattered map says that there is a secret entrance. To enter you need to touch a special place (key) on the cave wall/ceiling/floor.

//Phase 2// video help
 * Requirements**
 * Create 3 scenes
 * Scene 1: deep underground cave with secret entrance
 * Scene 2: cave with the secret entrance opened
 * Scene 3: a sunlit cavern on the other side of the secret entrance
 * Create these sprites
 * an adventure character (AC) under player control
 * a secret entrance
 * an oil lamp
 * a tattered map with two costumes
 * a small version being carried by the AC
 * a large version that hints/tells/shows where the secret entrance is located
 * Create these events
 * keys of your choice to allow the player to move the AC
 * //**Found entrance**//event that
 * senses when the secret entrance has been found
 * triggers Scene 1 to change to Scene 2
 * plays a "creaking" type of sound as the entrance opens

//Phase 3// Use the to get you started

Enhancement Oh, oh. There is a further complication. The lamp you brought with you is running out of fuel. As soon as you enter the dead end, you only have 60 seconds to find the key before it becomes dark. You may end the game at this point or allow the player to continue to grope for the key. In this case allow 5 minutes of searching in the dark before they die of starvation.



Two-player game
Modify S1, the Kung Fu Kat game, to make your story.

 =Scratch Skill Builders= The following assignments are skill builders to help build your game use the outline of Lessons and the accompanying videos to help you



S1 Kung Fu Kat or dancer
... player control of sprites toc Create a Scratch project with
 * one sprite that contains a welcome & instructions. This sprite appears when the flag is clicked but disappears when it is clicked.
 * one Kung Fu or dancing character that can be controlled by the arrow keys

Left arrow = left move Right arrow = right move Up arrow = jump up or spin clockwise Down arrow = duck a hit or spin counter-clockwise

60% - bare minimum including instructions to user 10 - add sound effects that correspond to moves (grunts, twirling music, etc) 10 - interesting background 10 - original art 10 - tells an interesting story
 * How did you do?**

Hint: [|s1 hint.sb]



S2 Random acts of kindness
... used to generate random occurences of hazards in the Project. See the sample project.

Create a sprite
 * with 2 costumes: one in neutral stance and another performing a random act of kindness,
 * that is kind and will perform a random act of kindness 80% of the time,
 * that has its kindness variable displayed

Write a script for your sprite that will do this.

You will need these items in your script: When flag clicked, forever, a variable called Costume1 (or similar), pick a random number, forever, if .. then .. else, wait 1 sec (so I can see the random acts!)

50% - bare minimum with Scratch sprites 10 - modified a sprite for the 2nd costume 10 - designed your own sprite with 2 costumes 10 - added a suitable background 10 - added a recipient to receive the random act of kindness 10 - added a talk bubble (say)
 * How did you do?**

Hint: [|s2 hint.sb]



S3 Animated letters
Create an introductory scene animating your name (or your game's name). Maximum length 15 seconds. Your scene needs to have theme music and a stage that reflects your personality, interests, and essence (or your game's theme). Include suitable animation for the letters.

50% - minimum criteria met 20 - Music, the stage, choice of letters reflect a theme 20 - Animated letters are effective & suit the scene 10 - There are no grammatical/spelling errors in the storyline
 * How did you do?**



S4 Avoiding hazards
select the option(s) that will most apply to your game

Modify the sample code to show how your game's sprites will combat each other.
 * Option A Combat Scene**

Use the random number generator to select 2 numbers, NumA and NumB. When players encounter a hazard in your game the player must correctly answer an addition or subtraction question before moving along.
 * Option B Arithmetic Questions**

Allow for 2 levels: Level 1 unlimited time, Level 2 has a 5 second time limit.

You will need to explore the input block.

Have your player control a sprite in a field of moving hazards. The player must move between these hazards to reach the other side safely.
 * Option C Sensing hazards/barriers**

Terrible things happen to the player if they touch any one of the hazards.



S5 Rocket countdown
You will need to use variables to control your game such as the number of lives or skill level.

These must be done somewhere in your program to each variable:
 * 1) **Initialization**: set with a start value
 * 2) **Incrementation**: change its value
 * 3) **Testing**: to see if a critical value has been reached; for instance, to determine if the game has ended.

Design a Scratch project that will launch a rocket. Count down from 10 to 1 and say 'Blast off' at the right time.

Make your launch realistic by including suitable sound effects, background, and costumes for your rocket.

BTW: think big What if you are asked to count down from 1000? Do you really want to write 2000 or 3000 lines of code? You must use a loop to do this. Hint: Repeat