What’s more fun than playing a game? Playing a game with your friend.
In this activity we will learn to create a multiplayer game which can be played by two people at the same time. Each player controls a character that can move around the screen and shoot. The player that gets the other sprite to 0 health wins. Good luck, have fun!
Download the Building Instructions Guide Below
What you will be learning in this Lesson?
In the above Scratch Activity you will be exploring the below concepts in detail
Collision detection typically refers to the computational problem of detecting the intersection of two or more objects.
With regard to scratch, collision detection is the understanding of the intersection/collision of two or more objects. You will be exploring this concept in the development of this game (between the bullet and the player)
Use of variables
Variables are very useful to keep values stored in your program. We will be using variables in this activity to keep a track of the players health. The health represents the strength of the player sprite, when it reaches 0 the player has been defeated and he loses the game.
When you are developing a shooting game, you should be able to move the sprite (wizard, in this case) up, down, left and right.
The sprite can be controlled by the keyboard arrow keys or any other keys that you like.
Movement using x and y coordinates
In the sprite movement, we will learn how the sprite moves according to x and y coordinates.
For example if we press the left arrow, then the wizard sprite will move on the negative x axis. This can be done in scratch by using the change x by -10 block.
In this activity, we will learn about cloning sprites. Sprites can be cloned so that they are reused for multiple instances (bullet and player sprites can be cloned).