Scratch Hippo in Space Game

by lberisha5224 in Circuits > Mobile

326 Views, 2 Favorites, 0 Comments

Scratch Hippo in Space Game

hippo gamegame.PNG

I made a game where the flying hippo has to dodge the asteroids in space.

Supplies

scratch.PNG

All you need is a device (I recommend a computer) and a scratch account.

Set Background and Characters

backround and charaters.PNG

The first thing you want to do is make the background and add the characters. Follow the images above. Click the background button on the bottom right corner and choose a space background or any other background then click the add character button beside that on and add a hippo or any other animal you want. Then click add character again, click create your own and find a picture of an asteroid on google and put that in as your asteroid character. Finally add one more but create your own again and write "die".

Make the Hippo Walk

hippo game hippo game movment.PNG

Next you want to start your code. We will start with the code for the hippo. This code allows your hippo to move up down left and right using the arrow keys. The small code on the right is so when die comes to stop all movement for the hippo.

Set Lives

hippo games lives stuff.PNG

The code on the top sets the lives to 3 and every time the hippo touches a asteroid or the walls then the hippo looses a life. The bottom one says that if the lives are less then one to broadcast die.

Add Music

hippo game musicc.PNG

Next you want to add music that fits the space mood or whatever your theme is. This will make it play on loop for the whole time you are playing.

Code the Asteroids

hippo game asteroid.PNG

The first code on the top makes the asteroids spawn every second. ( in the block "set size to 20%" you might need to change the percentage to fit the picture you used for your asteroid ). The next code makes the asteroids spawn randomly rather then only in one spot. It also tells them to keep going until it hits the hippo. The last code says that when die is broadcasted to stop all the asteroids from spawning.

Code "die"

hippo game end game.PNG
hippo game die.PNG

Lastly we need to code the "die". The first code makes the die go to the middle and hide so it cant be seen. then that's when the next code comes in, after the hippo looses all lives then die will show and everything will stop.

Play!

hippo game done.PNG

The last step is to play and show your cool new game to your friends and family!