Space Invaders

This guide has been designed to help you create a simple game. Follow these step-by-step instructions to create a traditional computer game from 1979.

Space Invaders is an arcade game created by Tomohiro Nishikado and released in 1978. It was manufactured and sold by Taito in Japan, and licensed in the United States by the Midway division of Bally. Within the shooter genre, Space Invaders is one of the earliest shoot 'em ups and the first fixed shooter.

Use the left and right keys to keep your spaceship safe from the ranks of advancing invaders.

Stage 1 - The basic setup

Start a new Scratch project - "File" and then "New"

Replace the cat sprite with the "Ship" sprite in the folder "Invaders". You will find the "Invaders" folder in the usual place in the Student share. make the background black - space is black again - and give the ship some left right motion. Set up the ship at 0,-150 using a "go to" block; 0 being the x value and -150 being the y value.

1. Screenshot your project so far and describe how you added the spaceship and all of its code.

Stage 2 - The Laser

Make a new sprite and create its costume. It is a very short, white vertical line. When you press the space bar it is fireed straight up toward the top of the screen; this is done by changing the y value of the position of the laser. The x value controls left and right and the y value controls up and down. When you press the space bar

2. Screenshot your project so far and describe how you created the laser.

 

Stage 3 - The Aliens

Add another sprite and give it the alien costume. The aliens have a strange but predictable motion, they will march to the right and when the first one gets to the edge of the screen they all come down a little and then march to the left and when the first one gets to the left edge of the screen, march down a bit and then march to the right and then repeat till they get to the bottom of the screen. To make life more interesting there are groups of them.

The thread that you write must check that the right most alien is near the edge of the screen and then make all of the aliens simultaneously march down a short space and then march to the left. This is done with a broadcast instruction.

Now duplicate the alien and change the "go to" block x values to be -200, -150, -100. -50, 0 and 50 for the 6 aliens.

When you press the space bar they should all move together.

When you shoot an alien with the laser the alien vanishes (or hides).

3. Screenshot your project so far and describe how you created the first set of aliens.

 

Stage 4 - More Aliens

Add another row of aliens by duplicating each of the existing aliens and change the y value from 120 to 80

Now add two threads to each alien, one to detect being struck by a missile and then hide or vanish and then another to collide with the ship and say "Game over".

Check to see that this works correctly

4. Screenshot your project so far and describe how you created the first set of aliens.

 

Stage 5 - Adding the barriers

Create a row of 4 barriers to protect the ship using the "barrier" costume from the "Invaders" folder. If the aliens hit the barriers the game is over and the ship cannot fire through the barriers at the aliens.

You can duplicate the barrier and change the x value of the "go to" block.to be -150, -50, 50 and 150. This will space the barriers out neatly.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stage 2 - The Laser

Add the largest asteroid from the folder and give it the motion as shown in hte image. The idea of the game is that when the asteroid passes out of view it will continue its journey in the same direction from the opposite side of the screen

4. Screenshot your project so far and describe how you added At least one of the improvements given above.

 

Add the other smaller asteroids as costumes to the larger asteroid.

 

 

Stage 4 - Extension

This is the working game although there are a few little issues to clear up. First, when the missile hits an asteroid it continues still hitting the asteroid so one shot is usually enough. Change this so that the asteroids has to be hit by different missiles to be destroyed. Second, in the real game when the asteroid is struck it splits in to two so there will be two middle sizes asteroids and then each if these will divide into two. Thirdly the asteroids get faster as they get smaller.

4. Screenshot your project so far and describe how you added At least one of the improvements given above.

 

Year 8 Extension

The arcade game also had an interesting way of moving the spaceship. As there is no gravity it behaves like a free body, i.e. if there is no acceleration then it continues in the same direction at the same velocity. It has the same limitation as an asteroid in that if it goes off the screen then it reappears on the opposite side.

5. Screenshot your project so far and describe how you added all of the improvements given above in both extensions

 

Recent Posts

May 24

Repairing a hyperspace window

You may have noticed the time shift in the Blue coridor, there is a redshift at certain times of the day; this has caused the bells to malfunction and the PCs are runing slow as the server room is also moving ever so slowly into the 5th dimension. The Lightspeed engineers are working hard to fix the hyperspace window being generated by the tidal effects of big data and the weaknesses in the walls caused by excessive data mining. Cambridge Analytica's data scraping has also contributred to the weakness in the space time continuum. There is no need to be afraid as everything is should be resolved in the near future; nevertheless steps are being taken, mostly from the gold staircase.

Any further information will be included here when and if we get it.

July 18

Adventuring with A GDPR SUrveyor

The GDPR surveyors will be in the College in the near future checking that you understand your obligations under GDPR. Are you aware of the consequences? Do you know who knows about you? Do you know what the people you don't know about, know about you? Have you checked your own settings? Are you privacy minded? The GDPR surveyors will check. They know you, possibly better than you do but maybe not as well as the Internet knows you.

July 14

Games for Free

There are a number of games that you can get for free that are really good. They are really good at collecting all of your data and passing it on to someone else. You don't know who they are and you don't know why they are collecting your data. They have your data and access to your friends. In minutes they have your friends' data and are collecting the data from their friends. If its a good game you will even tell your friends about it so you do their sneakiness for them and still tell your friends. It will never happen to you but hey that game...

Spotlight

Neural Implants

The pros and cons. Mostly cons.

Be permanently connected to Google and you can ask Alexa in your head; only you can hear the answer...