This is part 3 of a multipart series on creating a version of Missile Command using the educational tool, Scratch.
Adding a background is really easy in Scratch so I thought I would write something quickly on that. The key thing (if you aren’t artistically inclined) is making sure that you use an image which you have permission for. If you are using this as part of an ICT school project, there will be elements of the scheme of work on copyright so this is a good opportunity to make that link! There are many royalty free image repositories on the internet, but specifically, I was looking for either a night scene or something from space. In addition, I really wanted something along the bottom of the screen but mostly back elsewhere, so that my missiles etc. would show up easily. In my case, I used the site: www.gimp-savvy.com and picked up something from their NASA archive which you can see below:
I chose to save this image onto my desktop - I find it easier to place things there because there are buttons in Scratch which let you jump straight to that location. On to the task. The part of Scratch that you need to use is the Stage and this can be found down the side where the sprites live. Usually, it is blank like this:
To add a background, click on the stage and look towards this middle of the screen. Here you will see three tabs. The one you need to click on is called Backgrounds:
Backgrounds Tab Now, if you try and click on the “x” next to the Copy button, it won’t let you get rid of the image. The reason is that you need to have at least one background in the game. Instead, click on the “import” button which will bring up a file dialog. I usually store things on the desktop because it is an easy place to find, but you go to wherever you saved your image. Once there, click on your image, then on the OK button. Tada! You have a background for the game. This is what mine looks like:
Just to keep things neat and tidy, go back to where the backgrounds for the stage are, and click on the “x” of the blank background. We don’t need that anymore.
It is also worth mentioning that, as you will have noticed, you can draw your own backgrounds or use a webcam to take an image. I would guess that only a small minority of the readers live in space, so the webcam route might be redundant for this situation. If you do fancy drawing your own background, have a go! Just click on the Paint option - it is much the same as drawing sprites.
It’s almost time to fire some missiles. Look out for that in the next post.
Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’ logicalmoon.com