Games


Scratch Game

Maker Camp Project Time Icon

1 Hour to a lifetime :)

TO COMPLETE

Maker Camp Makey Logo

WHAT WILL YOU MAKE?

Learn the basics of creating your own video game in Scratch. This is a more difficult project for the more experienced makers in your Camp.
PRINT THESE INSTRUCTIONS
Maker Camp Project Materials Icon

WHAT WILL YOU NEED?

STEP 1

Getting started

Scratch is a very cool way to get start with programming. Very quickly, you can create your own games. Let’s get started by importing our own sprite. Click the import sprite button and select the Makey file.

Click here to download the extra files for this game.

STEP 2

Scaling

Wow, Makey came in giant, let’s shrink him down a bit. In the top of the screen there is a shrink button. Click on that and then click on Makey to scale him down some. Now drag him to the lower left corner as a starting point.

STEP 3

Starting the game

To start a Scratch game, you click on the green flag. Click on the events section on the scripts tab to find the “When Flag Clicked” event and drag it right into Makey’s script section.

Now let’s make sure Makey always returns home at the start of the game. Go to the motion section and add “go to x: y:” after the flag event. Set x to -181 and y to -120.

STEP 4

Get him moving

We don’t always want Makey just hanging out at the bottom of the window, so in the motion section add the glide function after the “go to” function. Set the glide to 1 second x:0 , y:0.

STEP 5

Controlling Makey

To control Makey we need to create new events. Go to the events tab and add a “when key pressed” event. Change the event to “up arrow.”

Now go to the motion section again and select the “change y by” function to attach to the key pressed event. Set it to 10.

Then repeat this for the Down (y -10), Left (x -10), and Right (x 10) keys.

STEP 6

A non-controlled object

Of course if Makey was just hanging out by himself, that would be boring! Let’s add another sprite. Click the import sprites button and select the Arduino. Don’t forget to shrink it down.
Now click on the Arduino sprite. We can see its script window is empty. Add a “when flag clicked” event so it starts at the same time as Makey. Since we won’t be controlling the Arduino, let’s make its motions go on forever by adding the “forever” control after the flag event.

STEP 7

Setting the Arduino

Sine we are not controlling the Arduino, we need to create some code to move it around. In the forever control, add a motion “go to” and set it to random. You may see the Arduino bouncing around the play window. Let’s constrain it a little by adding a motion “set x” function and setting it to 250.

STEP 8

Moving the Arduino

Now that the Arduino can be created at random points on the right hand side of the screen, we want to move it to the left.

Add a control “repeat” after the “set x” function. Set the repeat to 50. Now add a motion “change x by” and set it to -10.

Click on the green flag and watch your creation go. Use your arrow keys to help Makey fly around with the Arduinos!

WHAT'S NEXT?

These are just the first steps in making a game — there’s a lot more to explore in Scratch. Try out some of the tutorials that they have provided and also look at some games that other people have created. All the games in Scratch will allow you to look at the code behind it, so you can see how it works. I added more to the Makey game, which you can check out right here.

BROWSE MORE MAKER CAMP PROJECTS FIND EVEN MORE PROJECTS AT Make:

Please Note

Your safety is your own responsibility, including proper use of equipment and safety gear, and determining whether you have adequate skill and experience. Power tools, electricity, and other resources used for these projects are dangerous, unless used properly and with adequate precautions, including safety gear and adult supervision. Some illustrative photos do not depict safety precautions or equipment, in order to show the project steps more clearly. Use of the instructions and suggestions found in Maker Camp is at your own risk. Maker Media, Inc., disclaims all responsibility for any resulting damage, injury, or expense.

Collaborate on making projects here at Maker Camp

COLLABORATE

Make friends with Campers from all around the world and swap ideas!

JOIN THE COMMUNITY
Share your ideas and what you build on social media

ALL DONE? SHARE IT!

Share pictures and videos of your cool build! Be sure to use #makercamp

POST YOUR PROJECTS

Make: Getting Started with Arduino Kit

Start Making!

Spinbot kit

Maker Camp Gear

Getting Started with Arduino Kit

Make: Getting Started with Arduino Kit

Kit contains the components and book you need to make getting started with Arduino easy.

BUY NOW
Start Making!

Start Making!

Six great projects guaranteed to spark your imagination and get you making.

BUY NOW
Spinbot kit

Spinbot kit

Spinbots are easy-to-make drawing robots that kids love to build, tweak, and enjoy.

BUY NOW
Maker Camp Hat

Maker Camp Gear

Keep your campers cool with an official 2016 Maker Camp hat!

BUY NOW