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.

Starfighter.png



2. Code for the ship movement and switching to the thrust costume
StarFighterMovementSwitchCostumes.png



StarFighterCostumeInstr.png




StarFighterThrustSound.png
How may these blocks be helpful?
ScratchCenterPoint.png


3. Code for when the ship goes off screen that it reappears on the other side of the screen.

ShipsOffScreen.png



StarfighterOffScreenCode.png












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

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.
AstroidsGroup2.jpg

6. Code for each of the three asteroids to move randomly. Code for the asteroids to wrap around the screen.
AsteroidMovementWrappingCode.png


AsteroidMovementWrappingExpl.png


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.)
SpaceStarField.jpg

8. Code for the GAME OVER background to be displayed.
GAMEOVER_Background.png
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.
StarFighterShootBroadcastCode.png

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.
Laser_Bullet.png
11. Code for the Laser or Bullet so it only shows while shooting, shoots forward from the Starfighter/rocket, and wraps around the screen.
Laser_BulletCode.png

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.)
AsteroidsResponseHits.png

Example Code for Big Asteroids





BigAsteroidCode.png





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
AsteroidSmallCode.png

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.
StarfighterMomentum.png

15.







Two more pictures to use.

Explosion.jpg
space-fireworks.jpg

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





.