Introduction: How to Code a Basic Retro Space Shooter on Scratch!

About: I like 3d printing and I love designing things.

Hi I have created this tutorial for people who are new to coding on scratch and would like to create a game.

Below this is me playing the game.

Supplies

For This You will need to have or make a scratch account to create and save these games.

Step 1: Creating the Background

First Go to the background tab at the bottom of the screen, Click it then convert to bitmap. Use the bucket to fill it with black and then add white dots. Note: you can animate it but that is optional.

Step 2: Add a Ship

To add a space ship I Set my pen size to 5 on bit map to make it a pixel and made something that looked like a rocket. I also decided to add a spinning animation.

Step 3: Aliens!

Now for the fun part Design an alien That the ship has to defeat to get points. For my alien I decided to make it spin to make it look cooler

Step 4: Add More Aliens and Delay Animations for Wavelike Pattern

For this step you add a block that says go to and set the start location and then get the glide to block and set were you want it to go. Then add multiple aliens with the same script and add a short 0.1 - 1 second delay adding a tenth or more seconds each time this should result in a wavelike pattern if done correctly.

Step 5: Laser Beam

Create a beam out of pixels any design you want then make it hide when flag clicked but when space key pressed show go to the space ship whatever sprite it is and change y by 20 until it hits the alien or make it wait 3 seconds and then hide.

Step 6: Score and Alien Hit

Make 2 new variables one called hit and one called score. Make it so when the flag is clicked these two variables are set to zero. Go to all of the alien sprites and make have a forever block around an if then block which says if touching laser beam (what ever the sprite is called) then change hit and score by one. Now code it so when hit equals three make the aliens show and then make it so when hit equals six show a new sprite which is your YOU WIN! screen.

Step 7: The End

That is all there is to making a shooter game

If you would like the rocket to move then do when key left or right pressed then move -10 or 10 x Eathier direction

Anything Goes Contest

Participated in the
Anything Goes Contest