Tuesday 23 March 2010

Examples of Scratch Code

Use the HELP screens to discover more
The following might be helpful in developing your game.

Code for a sprite to keep moving in a random way, when it hits the edge of the screen it will bounce.

















Code so that the sprite follows the mouse pointer













Code to reset
- Your Name
- Score to Zero
- Sprite size at start of the game
Ask you to enter your name
The game really STARTS
IF you hit sprite 1, you win points
The dog makes a noise
IF the score is > 20
- the sprite changes size
- changes colour
- and says you win
THE GAME STOPS
IF you hit sprite 2 your name is shown
You are told your score is being reset
to ZERO
and the sprite is made smaller.








To Display some Instructions for the game - make a sprite with the text on it, you can hide the text when the game starts.

No comments:

Post a Comment

Comments will be reviewed before being published.

Note: only a member of this blog may post a comment.