1 / 14

Space Invaders

Space Invaders. Setting the scene. Create the background for our game. Keep it simple so it’s not too distracting. Create the player sprite. Controlling our player.

lieselotte
Download Presentation

Space Invaders

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Space Invaders

  2. Setting the scene Create the background for our game. Keep it simple so it’s not too distracting.

  3. Create the player sprite

  4. Controlling our player Notice how we set the starting position of our player every time a new game starts. We also ensure it’s pointing in the right direction too. • POINT and GO TO blocks can be found in the Motion section. • FOREVER loops and IF statements can be found in the Control section.

  5. Laser creation Create a new sprite and design a simple laser within the editor.

  6. Laser movements The laser will only fire when the space bar is pressed. Until then, the sprite remains hidden but still follows the player sprite around.

  7. Aliens Create a new sprite and design a simple alien within the editor.

  8. Alien movements The alien will continue to move across the screen until fired upon. Note how the alien moves closer to the bottom of the screen whenever it reaches the edge of the screen.

  9. Game over It is game over when an alien successfully reaches the bottom of the screen and collides with the player. Use an IF statement to test for this scenario. This is the programming for the alien. It needs to communicate with the player sprite when it’s game over. This is done via a BROADCAST.

  10. Explosions Create another costume for the player sprite but this time draw an explosion in the editor.

  11. Game over (continued) Open up the blocks for the player sprite. When it receives the game over message for the alien sprite, STOP ALL. Notice how the costume is changes when it’s game over. Remember to reset the costume when a new game starts.

  12. Duplicate, duplicate Once we are happy with the alien’s logic, we can then go ahead a duplicate the sprite. With every duplication, remember to amend the starting position each time.

  13. Scoring Create a variable called Score, we will use this to record the score throughout the game. Points are awarded when aliens are shot.

  14. Don’t forget the reset With every new game, we need to reset the Score variable.

More Related