29 September 2015
I've been thinking recently about how you can make your Scratch games more professional and complete, and two ideas occurred to me: including a title screen and a high score table. I wrote tutorials on how to do both for The MagPi magazine, the official magazine of the Raspberry Pi. A lot of people who are interested in Scratch aren't online much over the summer (teachers and their students) so I thought I'd wait until the new school term before telling you about them both here. You can download the back issues that include these tutorials for free.
Issue 37 includes my tutorial on adding a high score table to a Scratch game. It uses a list to store the top ten scores and then compares the new score and tells you how you ranked. It should work with most simple games.
Issue 36 included my tutorial on adding a start screen to your Scratch game. I included a simple game for this so that the article could demonstrate the transition between the game and its title screen. The same concept should apply to most simple games. The article includes tips on patching the title screen in, in place of your 'when green flag clicked' scripts.
The MagPi is published each month, and you can support it by buying it in WH Smiths as a printed magazine or subscribing to receive it by post.
04 September 2015
One of the games in Scratch Programming in Easy Steps appears to have a bug on the Raspberry Pi, presumably caused by changes to Scratch in the latest version of the operating system. The game concerned is Quiz Break (chapter 6) and the bug is that the clock doesn't draw or work correctly. You can fix it by adjusting the centre of the costume like this:
- Click the arrow sprite to go to it
- Click the Costumes tab
- Click to edit the costume
- Click the button to set the costume centre
- Click and drag the costume centre to the middle of the arrow stalk, roughly in line with the back-pointing tips of the arrow's head (see picture)
- Click OK
I was so surprised to find this error, knowing how many times everything was tested and double-tested during production, that I found an old copy of the Raspberry Pi software and tried my book version on it to double check it worked there. I'm not quite sure why that same file doesn't work on the latest version of the Pi software: I had assumed that sprite data (including the costume centre and size) was stored in the Scratch file, and that has always appeared to be my experience, but perhaps there's an issue with loading it.
Many thanks to Don Sturtz, who discovered this issue and wrote to tell me about it. Thanks to all the children, adults and teachers who have told me they're learning Scratch with the book too. One of the nice things about Scratch is that it has a vibrant online community, so I often get to see what readers have made using the book and get their feedback. The book covers Scratch 2.0 (the latest version) and Scratch 1.4 (on the Raspberry Pi) and shows readers how to make a range of games and projects that explore Scratch's capabilities. If you're starting Scratch this term, want some new games to build, or want to sharpen your skills, you can download a sample of the book here to find out more about the book.