I Just Created My First Game Using Scratch

This is the first game I programmed with scratch

My son gave me a quick tutorial this morning in programming with Scratch, the online environment hosted by MIT for learning to code by creating video games. Just for fun, I figured I’d share it here. Scroll to the bottom to play.

Programming With Scratch

I’ve written code before in various programming languages, but my son is using Scratch at school and wanted to show me how it works. I’m impressed with the things you can do with this type of drag and drop coding environment. It teaches the logic needed to write software code, but without having to worry about some of the issues related to syntax (or stupid stuff like forgetting a semicolon). All that can come later, after gaining an understanding in how to think through the logic required to develop functioning software applications.

Using Scratch is pretty simple. Essentially, you create “sprites” to represent your character as well as the other active game elements. Programming with scratch is done by dragging and dropping code blocks, which snap together into sequences, and setting values as necessary.

As you can see below, the available code blocks are on the left. You click and drag them to the coding area to create sequences associated with each sprite. On the top right you have the game preview.

Programming with Scratch - an example of the programming environment
Programming with Scratch – an example of the programming environment

My First Scratch Game

Here is my first scratch game. It’s fairly simplistic, and it’s far from perfect. The objective is to jump over as many trees as you can while moving through the forest. Click the flag to start the game and use the space bar to jump. You get a point for every tree you successfully jump. Hit a tree and it’s game over. That’s pretty much it. Go ahead and give it a try.