Asteroid+Test

http://robotstpjhs.wikispaces.com/file/view/scratchasteroids01%20%281%29.pdf/564082897/scratchasteroids01%20%281%29.pdf

Asteroids 1. Prepare the ship picture. Costumes with and without thrust, plus exploding big and small.



2. Code for the ship movement and switching to the thrust costume How may these blocks be helpful?
 * [[image:StarFighterMovementSwitchCostumes.png width="251" height="504"]] ||  ||   ||   || [[image:StarFighterCostumeInstr.png width="217" height="313"]] ||
 * ||  ||   ||   || [[image:StarFighterThrustSound.png width="251" height="111"]] ||

3. Code for when the ship goes off screen that it reappears on the other side of the screen.
 * || [[image:ShipsOffScreen.png width="307" height="256"]] ||  ||   ||   || [[image:StarfighterOffScreenCode.png]] ||   ||   ||

4.Code for the collisions of the asteroids with the ship and ship explosion.

5. Prepare one to three asteroid pictures using one to three of the pictures below only. Make a big, and small version of each asteroid you choose. Your game will have at least three asteroids moving around your ship at the start. The scratch program has a feature to re-size the asteroids to get a size that works well. In all you will have six asteroid sprites.

6. Code for each of the three asteroids to move randomly. Code for the asteroids to wrap around the screen. 7. Make a GAME OVER background using the starfield picture supplied for the stage. (The GAME OVER message is broadcast from rocket when it collides with an asteroid.)
 * [[image:AsteroidMovementWrappingCode.png width="385" height="345"]] ||  ||   || [[image:AsteroidMovementWrappingExpl.png width="265" height="210"]] ||   ||   ||

8. Code for the GAME OVER background to be displayed. 9.Code for the rocket to shoot a bullet. A shootBullet message is broadcast from rocket when space key is pressed. Remember to add this code to the Starfighter/rocket by selecting it.

10. Draw Laser or Bullet sprites. Select the paintbrush next to the folder icon and draw a line in a color. One Laser or bullet is OK, but you can have two or three. 11. Code for the Laser or Bullet so it only shows while shooting, shoots forward from the Starfighter/rocket, and wraps around the screen.

12. Code for the Big asteroids to explode when shot. (When shot a big asteroid changes to a medium asteroid and then the medium asteroid changes to a small asteroid when hit again. The small asteroid is eliminated when shot. Code for what happens to each asteroid when it is shot.)

13. Code for the small asteroids. Small asteroids appear near where the bigger asteroid exploded traveling in roughly same direction. •Each smaller asteroid belongs to a larger asteroid • Each smaller asteroid sprite has the same script except for responding to asteroid01, asteroid02, or asteroid03 If small asteroids are if hit by rocket or bullet, explode and don’t worry about smaller chunks
 * Example Code for Big Asteroids ||  ||   ||   ||   ||   ||
 * [[image:BigAsteroidCode.png width="364" height="433"]] ||  ||   ||   ||   ||   ||

14. Give the ship momentum. Add the code one part at a time as indicated by the red boxes. Test as you add the code form each box.

15.

Two more pictures to use.



https://scratch.mit.edu/discuss/topic/15510/?page=1#post-136195

.