Sean's Scratch 2.0 and Scratch 1.4 Example Games Arcade
Programming in Scratch, you can easily create games and animations. The programming language is widely used in schools and I've used it with adults to teach the first principles of programming. I put together this page of some of the games I've made in Scratch partly because I thought you might enjoy playing them, but also to provide an example of the kind of things you can achieve using Scratch. To start each example game, click the green flag button.
NOTE: These demos only work if you have a device that supports Flash. They don't work in Internet Explorer. You can program in Scratch on devices that don't support Flash, though, including the Raspberry Pi.
To learn how to make games and demos like these, and many more, read my book Scratch Programming in Easy Steps.
UPDATE: I have a new book now too, Cool Scratch Projects in Easy Steps. Follow that link to find videos, bonus materials and all the projects online to try in your browser!
Space Swarm is a classic alien shoot-em-up game. Use the cursor keys to move and the spacebar to fire at the aliens who approach you from the right. This game is the last big project in Scratch Programming in Easy Steps. It works on both the Raspberry Pi (Scratch 1.4) and the new Scratch 2.0, but it runs much faster under Scratch 2.0. This game has music and sound effects.
In this game, you (the Scratch cat) have to dodge the beachballs and collect the ice creams. The top-left corner shows your energy remaining: the cat gets smaller as your energy fades. This is actually a modified version of the game from Scratch Programming in Easy Steps. The chapter concludes with tips on changing the difficulty. I decided the game was a bit too easy in its raw form, so I made it sap your energy faster when you touch the balls, and also added some extra beachballs to dodge. This demo uses the cloning feature that was newly introduced in Scratch 2.0.
This is one of the quick demos in Scratch Programming in Easy Steps. Use the cursor keys to move the footballer and keep the ball in play. The aim is to smash through the wall at the top.
It only takes up two pages in the final book, and is a great illustration of how you can make simple game mechanics using very little code in Scratch. I was quite pleased with the illusion of breaking down the wall. My first demo for this effect had fireballs raining down on a city skyline and blowing holes in it. There's lots you can do with this effect.
This is another shortie from the book, but I really like the speed and fluidity of the gameplay. Use the cursor keys to get the cat over the road safely to collect its shopping. When you've collected an item, take it back to the bottom of the screen, and a new item will appear for you to collect.
In most programming languages, implementing Hangman is a pretty simple demonstration of string handling. In Scratch, it's actually a pretty hard project. Firstly, there's no way to write on the screen (except by using speech bubbles), so I've used a sprite with costumes for each letter. Secondly, the text handling capabilities are somewhat limited. Nevertheless, I've used Hangman in the book to demonstrate list handling, structured programming, and how you can get around some of Scratch's limitations to achieve effects like text on the Stage.
In this simple maths quiz, you're challenged to answer 10 times tables questions in under 30 seconds. If you can do it, the host will do a break dance for you.
Scratch 2.0 introduced webcam support. This simple example shows how you can use your webcam to guide sprites around the screen. Make sure your webcam is set up, click the green flag to start, click Allow to let Flash use your webcam. Then use your hands to guide the beetle to the donuts. There's no scoring in this - it's just a simple demo using webcams in Scratch.
This simple demonstration has a limited vocabulary, but is designed to be easy for readers of Scratch Programming in Easy Steps to customise. It enables you to have a chat with a penguin, who says things at random, but starts to copy what you say to it. By adding more phrases to this, you can create a good simulation of artificial intelligence.
This is one of my favourite projects in Scratch Programming in Easy Steps. Use the cursor keys to guide the fish to meet his friend the crab in the middle of the spiral. Be careful turning corners: you don't want to catch his tail on the spiral! This game combines the drawing techniques of Scratch with sprites, and is the first game in the book.
In this whack-a-mole style game, you need to click on the animals as they appear to take their photos. You score points depending on how often the animals appear and how big they are. How many can you click before your time runs out? This is another very short demonstration from Scratch Programming in Easy Steps, showing what you can make using the built-in graphics (plus the Game Over bannner I made), and just a few blocks of code.
Defend your planet from the invading aliens! Use the cursor keys to move left and right and the spacebar to shoot. Martian Attack was the example game I created for the Scratch chapters in Raspberry Pi For Dummies. I developed this game on the Raspberry Pi.