Download presentation
Presentation is loading. Please wait.
Published byMelvyn Baldwin Modified over 8 years ago
1
Index Background Costumes Making object walk smoothly Controlling an object with the keyboard Control an object with the mouse Changing costume when hit by an object Creating Variables Firing An Object Shooting an object with a target Increasing score when object is hit by another object Setting score, background & costume at start of game Changing Level Creating random movements If touching Objects Gravity, Flying, Return To Ground Creating a Scrolling Background Useful Links
2
Scratch Backgrounds Make you own Image or Modify it Import your image Click here Index
3
Costumes – Create, Import, Modify Allow the cat to rotate Allow the cat to move left and right only Import your own image Create or modify your own costume Index
4
Making object walk smoothly Costume ‘walk_1’ represent the fist half of one step and costume ‘walk_2’ represent the second half of one step. By combining them together at the correct speed the object looks like it is walking. Index
5
Controlling an object with the keyboard You may use this code alongside controlling the object with a mouse to create a two player game. Note that I have included the code that stops the sprite disappearing off screen. Index
6
Control an object with the mouse Index
7
Creating Variables Click on “Make a variable” Give it a sensible name All done Index
8
Firing A Object The code has to be listed under the object which represents the missile/ built. For example the code above is listed under the my missile. Index Missile starting point Missile flight path
9
Shooting an object with a target This code is used when you want to shoot an object with your target/ weapon. You need to place this code object you want to kill.
10
Changing costume when hit by an object This code has to be listed under the object which will change. For example the code above is listed under the enemy spaceship which the missile is attempting to blow up. Index
11
Increasing score when object is hit by another object This code has to be listed under the object which will change. For example the code above is listed under the enemy spaceship which the missile is attempting to blow up. Index
12
Setting score, background & costume at start of game Index
13
Changing level can be done in lots of different ways. The simplest ways are to change the background or sprite (object) when the play score reaches a set amount. You must have your backgrounds or sprite and the ‘variable’ score already create. Remember to select the stage or sprite before you start coding. Changing Level Changing level by SpriteChanging level by background Index
14
Creating random movements This code will make the cat move in random angles between 45 and 120. Index This is my game code for the fire ball.
15
If Touching Objects There are two ways which you can achieved this a) by colour b) by object By Object By Colour Index
16
Create a Start Screen You need to create a image which will look like a game welcome page. Then you hide all objects (sprite) and backgrounds (stage). Set the background (stage) colour to it matches your image background. Then you create code that does something when the correct button is pressed. If the key ‘e’ is pressed then the game is stopped. If you want to reset the score you will need to add more code. To exit the game you will need to use this stop code. Index
17
Gravity, Flying, Return To Ground You will need to have your keyboard code that allows you to control the object. This simply said that it you are not pressing the arrow key return to the bottom of the screen. Index
18
http://scratch.mit.edu/projects/archmage/76150 Creating a Scrolling Background Word versionWord version... PDF versionPDF version Program Code Image width = 700 Index
19
http://learnscratch.org/index.php?option=com_content&task=vi ew&id=211&Itemid=301 http://scratch.redware.com/lessons.html http://www.hairbychas.com/scratch/home.html http://www.expo.spps.org/Scratch_Tutorials.html http://www.smsn.vic.edu.au/ictguy/index.php/scratch-resources/ http://www.cs.harvard.edu/malan/scratch/printer.php http://www.ictcoverlessons.com/cover_lessons/scratch/pong/pong. html Useful Links Index
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.