browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Shooting Game 2

This is the second lesson in which we will code a game in which you must shoot sprites. Have a look at some of the unfinished games (here) created by children last week.

.

If you did not complete last week’s lesson (here), you must complete that first.

.

Click on the picture to play my Witch Hunt. It shows the sort of game we’ll be coding.

.

You are all at different stages with your coding. Today I have posted four videos. Some of you will skip the first and move through the other videos. Some of you will just get through the first one or two videos. Do what you feel is right for you…

.

The first video shows you how to create a score variable – so that the player gets a point if they shoot the sprite. I will also create a time variable – so that the game ends after 60 seconds.

.

.

If you know how to do this, then skip this video and create the code. You can always watch the video if you get in a muddle!

.

.

This second video will show you how to make your game more interesting by quickly creating a second sprite that moves in a different direction. I will show you how to tweak the code and highlight a couple of problems that you might come across

.

.

.

.

This third video will show you how to make your game less predictable by randomising when the sprite moves across the screen and how fast it travels. This is a little more complicated.

.

.

The final video will show you how create a friendly sprite that the player should not shoot!

.

This project can quickly produce a lot of code. It is critical that you test your code every time that you change something. If it isn’t working, try to find the problem before moving on. If you don’t test your code regularly, it can become very difficult to identify errors…

.

.

.

If you get stuck, share your game by email, describe the problem and we’ll do our best to help.

.

.

Please share your games with us!