150 likes | 279 Views
GAME:IT Junior. Paddle Ball. Objectives:. Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a simple scoring system Using old and new skills, develop a game of “paddle ball”.
E N D
GAME:IT Junior Paddle Ball Objectives: • Review skills from Introduction • Create a background • Add simple object control (up and down) • Add how to create a simple scoring system • Using old and new skills, develop a game of “paddle ball”
Here are the 5 sprites you will need to create for Game2. They are located in Game2 Resources. They are spr_ball, spr_edge, spr_miss, spr_score, and spr_paddle
Create the 3 sounds listed below and load the sounds from the sound files in the Game 2 Resources folder snd_beep= beep.wav snd_score= score.wav snd_miss= miss.wav
To create a background, just load the background from the Game 2 Resources folder and name it bckgd_green. Or you can load any picture you may want to use for a background and label it bckgdand then what it is.
Create the following objects and associate the sprites you created earlier. obj_ball, obj_paddle, obj_scoreobj_miss, obj_edge, and obj_scoreboard. All objects are checked visible & solid EXCEPT obj_miss & obj_scoreboard. obj_miss has none checked. obj_scoreboardhas just visible checked and DOES NOT use a sprite.
Create a font to display the score Name it ft_score - Select the font of your choice - Select the Size and choose Bold and Italic if you wish Click OK to save
Create a Room to look like the one below: - Make sure the X & Y Snap is set to 16 - Add obj_scoreboard in the upper left corner. Because no sprite is assigned to this object, it displays as a blue circle with a red question mark
Programming the Objects: Obj_edge: Has no programming Obj_score: One EVENT: Collision with obj_ball Actions: Set Score: New Score = 1 Also, check the relative button. This increases your score each time the ball hits the wall. Play Sound: Select snd_score from the drop down. Loop = False (we don’t want the sound to repeat)
Obj_miss: One EVENT: Collision with obj_ball Actions: Set Score: New Score = -2 Also check the relative button. (Decreases your score by 2 when you miss the ball) Play Sound: Select snd_miss from the drop down. Loop = False (we don’t want the sound to repeat)
Obj_paddle: Four EVENTs: Event 1: Collision with obj_edge Action: Move Fixed - select the center button (stops movement)Speed = 0 Event 2: Keyboard event – Select <No Key> Action: Move Fixed select the center button (stops movement)Speed = 0 Event 3: Keyboard event - Select <Up> Action: Move Fixed – Select the Up arrowSpeed = 7Relative is NOT checked Event 4: Keyboard event – Select <Down> Action: Move Fixed – Select the Down arrowSpeed = 7Relative is NOT checked
Obj_ball: Five EVENTs: Event 1: Create Actions: • Set Score = 0 (This starts the score at 0)Relative is NOT checkedMove Fixed – Select the 4 corners. Speed = 5Relative is NOT checked Event 2: Collision with obj_edge Actions: Bounce precisely against solid objects Play Sound = snd_beep; loop = false
Event 3: Collision with obj_paddle Actions: Play Sound = snd_beeploop = false Move Fixed - Select the 3 left facing arrowsSpeed = 5 Relative is NOT checked Event 4: Collision with obj_score Action: Bounce precisely against solid objects. Event 5: Collision with obj_miss Actions: Jump to Start position Move Fixed – Select the 4 corner arrowsSpeed = 5Relative is NOT checked
Obj_scoreboard: ONE EVENT: Event 1: Draw > Draw GUI 3 Actions Action 1: Set the color Click in the color field to see the Color pop up. Select a color that will show up on the green background.
Obj_scoreboardcontinued Action 2: Set Font Font = ft_score Align = Left Action 3: Draw Score x = 50 y = 25 Caption = Score:
Save the Game—Save it as Game2_yourname It is now ready to test your game! Assignment: Modify the game so that each time the ball hits the paddle, the ball increases in speed – which increases the difficulty of the game. Also – change the background to another image (if you didn’t already). Save it as Game 2A_yourname