The big video game companies create best-selling titles every year, but for the rest of us, bringing our own unique game ideas from wishful thinking into reality is notoriously difficult.
Creating even the simplest functionality can take tens of thousands of lines of code. Luckily, the MIT Media Lab has created free software, Scratch (scratch.mit.edu), that lets kids create their own games or interactive stories using an easy drag-and-drop interface and some elementary programming.
Download, install, and launch Scratch, and soon you’ll be creating simple “side-scrollers” — games like Super Mario Bros., where characters navigate obstacles left-to-right. You can also make your characters communicate via speech balloons, like an animated cartoon. Scratch makes no distinction between games and animations; it’s all in your programming.
Steps
Step #1: How Scratch works.
Next
- In software parlance, Scratch is an object-oriented, event-driven, visual programming environment. Let’s take those terms separately.
- Object-oriented means that you design each character in your game (each sprite) by putting together scripts that dictate its behavior. Then when you run the game, the sprites all just do their own thing. To influence each other, the sprites pass coded messages called broadcasts.
- Event-driven means that every script you assemble for each sprite runs in reaction to some triggering event, like when the player clicks on the sprite, or hits one of the keyboard keys, or when another sprite broadcasts a message.
- Visual programming environment means that blocks on the screen represent basic programming elements, and you assemble a series of instructions by dragging-and-dropping the blocks together into stacks. The blocks are color-coded and shaped so they only fit together in ways that make sense programmatically: the triggering events look like folder tabs, and the subsequent steps fit together like jigsaw puzzle pieces. Numbers fit into round holes, text strings fit into rectangular text boxes, and conditionals fit into diamond-sided holes that look like decision points in a flowchart.
Conclusion
References and Community
Scratch is well documented at http://info.scratch.mit.edu/ support, which has a good How to Get Started document and a Reference Guide that documents all of the blocks. With these resources, you should have no trouble creating your projects. And if you want some inspiration for coming up with ideas, the Scratch website also boasts more than 500,000 projects you can view and play online. To explore what others are doing with Scratch, go to http://scratch.mit.edu/channel/recent.
The Scratch community lets you share your projects and comment on others. To join, go to http://scratch.mit.edu/signup. Sharing your project is as easy as clicking Share at the top of the Scratch window and then choosing “Share this program online.” If you like someone else’s project, you can download and change it yourself, which is a great way to learn. But if you gain inspiration (or code) from other people’s projects, make sure you credit them.
For people to play your Scratch games directly, they need to have Scratch installed on their own machines. But there are also ways of converting Scratch projects into .exe executable files that will run on any Windows machine.
Visit http://makezine.com/21/diykids_scratch for downloadable examples of user created games.
This project first appeared in MAKE Volume 21, page133.































