Asteroids

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.

Use the left and right keys as well as the mouse to keep your spaceship safe.When a slow moving large asteroid is hit, it becomes a number of faster moving and smaller asteroids.

Stage 1 - Making the spaceship

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

Replace the cat sprite with the "SpaceShip" sprite in the folder "Asteroids". You will find the "Asteroids" folder in the usual place in the Student share.

Make the stage the blackness of deep space.

Use the traditional controls to make the space ship turn left and right.

Add a small white dot as a missile.

Next add the motion to the missile. This introduces the "position of" block as shown in the image.

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

 

Stage 2 - The Asteroid

Add the largest asteroid from the folder and give it the motion as shown in the 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

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

Add another thread that will change costume when the asteroid is hit by the missile.

Duplicate the asteroid so that there are now 4 of them.

2. Screenshot your project so far and describe how you added all of the asteroids.

 

Stage 3 - Destroying the spaceship

Duplicate the spaceship costume and break it apart a little.

Repeat this a few more times so that when the spaceship is struck by an asteroid it sort of comes apart.

Add a thread that changes the costume in sequence when the asteroid strikes the spaceship.

This is all well and good, but you would need to write a thread for each asteroid striking the space ship. An easier way is to get the asteroid to detect the ship and broadcast a value such as "hit" and then get the ship to break apart when it receives the broadcast "hit".

3. Screenshot your project so far and describe how you arranged for the spaceship to be destroyed by an 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...