lunes, 14 de marzo de 2016

Práctica Scratch 3. Create a GAME!!!

Create a Pong Game

Make a version of the bouncing ball game. Find out how to add sounds, points, or other effects. Then, challenge your friends to play.


1. Choose a Backdrop

Choose a backdrop for your pong game.
Click the  icon to open the Backdrop library:
Then choose the backdrop you want (such as neon tunnel or brick wall):
   

2. Choose a Ball

Click the  icon to choose a new sprite:
Then select a ball for your game:
Why are characters in Scratch called 'sprites'? We borrowed the word from the first video games.
You can delete the cat with the scissors tool. Click on the scissors, then click on the cat:
Or, use the right-click menu (Ctrl+click on Mac), and choose 'delete'.

3. Make the Ball Move

Click the Motion category, and drag out a moveblock into the Scripts area.
drag move block to Scripts area
Then, click on that block to make the ball move.
drag move block to Scripts area

4. Move and Bounce

Want it to keep going? Snap on the block if on edge, bounce.
Then, click the Control category. Wrap a foreverblock around the other blocks, like this:
Click anywhere on the stack of blocks to try it.
To stop, click the stop button: 
Want it to go at an angle? Snap a point in direction block on top, and type in an angle.
Next, click the Events category.
Drag out a when  clicked block and snap it on top:
Your script will start whenever you click the green flag:
Tip: Want to change the speed of the ball? Type in a different number of steps:

5. Choose your Paddle

Add a paddle so you can start to play! Click to choose a new sprite:
Then, select a paddle from the Sprite library:
Tip: Adjust the size of the paddle by clicking with the grow or shrink tool:

6. Control the Paddle

Make it interactive! You can control the paddle with the mouse cursor.
Select the paddle.
Then build this script:
Click the green flag to start your scripts: 
How can you get the ball to bounce off the paddle? Find out in the next step!

7. Bounce Off the Paddle

Click to choose the ball:
Add this script to make it bounce whenever it hits the paddle:
Here’s how to build the script:
Click the green flag to try it out: 

7. Add a Sound

Make a sound when the ball hits the paddle.
Click the Sounds tab, then click 
Choose the 'water drop' sound (in Effects):
Then, click the Scripts tab. Click the Soundcategory, and drag out a play sound block.
Snap that sound block into the script, like this:

8. Add a Challenge

Make the game stop if the ball hits the bottom.
Click to select the Stage:
Select the Backdrops tab.
Now you can edit your backdrop. Select the line tool. Draw a thick line at the bottom:
Tip: Hold down the Shift key while drawing the line to make it straight.
Tip: To undo, click the Undo arrow:
Click to select the Ball sprite:
Click the Scripts tab, then add this script to make the ball stop if it hits the line color:
Tip: Click inside the square box in the touching color block. Then move your cursor to point and click on the bottom line color.

9. Enhance and Customize

What else do you want to add to your game? Try some of these ideas.

ADD EFFECTS

Change the color of the ball when it hits the paddle.

STARTING POSITION

You may want to set the ball’s starting position.
Move the ball to where you want it to start, then drag the go to x: y: block into the top of this script:

ADD POINTS

Create a variable for keeping score.
Then add the score blocks to your script:
You can also change what happens when the ball touches the bottom. For example:

10. Share Your Game

Congratulations! You've coded your own game!
Type a title for your project.
When you are ready to share your project with others, click the “Share” button at the top of the screen.
Tip: You'll need to sign up for a Scratch account to share your project online.
To add notes and credits, click:
Here's a video on how to edit the project page:
Now you can add your project to the Pong Game studio:

No hay comentarios:

Publicar un comentario