Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Scratch 2.0 Game Development Hotshot
Scratch 2.0 Game Development Hotshot

Scratch 2.0 Game Development Hotshot: Get up to date with Scratch 2.0 and build brilliant games without having to code. Including 10 exciting projects that cover most game genres, you'll quickly learn the sophisticated possibilities of Scratch. Have fun!

eBook
$22.99 $25.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Scratch 2.0 Game Development Hotshot

Chapter 1. Blowing Things Up!

Scratch is a fun-to-use program that teaches you about animating, programming, and building games. You already know this because you have been making simple games with Scratch for a while, and now you want to learn more. This project will use some of the most important Scratch tools and explain some basic game programming principles.

Mission briefing


We will make an artillery game. You might know this type of game from the very popular Angry Birds series, but this is actually a very old concept, dating back to the earliest computers. It was an obvious choice for imaginative programmers to turn military calculations into a game, because computers were originally used to calculate missile trajectories.

Why is it awesome?

We won't be able to guide any real missiles (luckily) with the scripts in this game. Instead of using proper mathematical calculations, we will use some simple tricks to get the desired results.

In games, it is rarely necessary to be absolutely realistic. Sometimes, bending the rules of reality creates more spectacular results; take Angry Birds, for instance:

We won't build a game as sophisticated as Angry Birds straight away. Our example will be more bare bones but still fun to play. In later projects, we will look back at this first example, and you will be challenged to add new things to this game to make it more interesting.

Your Hotshot objectives

In this project we will be:

  • Creating a new project

  • Starting scripts

  • Adding targets

  • Creating a parabolic shot

  • Creating a landscape

While doing this, you will learn about (among other things):

  • Drawing with Scratch

  • Using variables

  • The xy-coordinate system

  • Operators and conditions (what has to happen and when)

  • The very useful cloning feature to quickly duplicate objects

Mission checklist

To get started, go to the Scratch website (scratch.mit.edu) and start a new project by clicking on the Create button at the top of the page. If you already have a Scratch account, it might be useful to log in first, so that you can save your work in your account. If you are new to Scratch and are unfamiliar with the interface, have a look at Appendix, The New Scratch Interface.

Creating a new project


We need to make sure that we're logged in and ready to get to work on a new project. We'll then draw some sprites and assemble our awesome cannon (and cannonballs). The Scratch menu bar gives us the option to explore the existing projects from other users (using Explore) or create a new project ourselves (using Create):

Prepare for lift off

You are presented with a new project, including the Scratch cat as usual. We won't use the cat, so you can right-click on the sprite, and choose delete. A sprite is the official name for a 2D computer image. Most Scratch projects are built using sprites. You can find an overview of all the sprites used in a project in the bottom-left corner of the screen, underneath the stage.

Engage thrusters

We will draw our own sprites for this game. Let's start with a simple cannonball!

The cannonball will be the main actor in this game because it will be the object that "blows things up". There are a few ways to add a new sprite to the stage. We can draw a sprite, select a sprite from the Scratch library, or import it from our hard drive. It's also possible to take a picture with a webcam.

To draw sprites, we perform the following steps:

  1. Click on the little paintbrush icon between the stage and the sprites window. This will open the costumes tab.

  2. Check if the editor is in Bitmap Mode or in Vector Mode. To create our drawing, we will select Vector Mode.

  3. Select the Ellipse tool (the circle) seen on the right-hand side of the drawing canvas. Click and hold the left mouse button and drag it. You will probably end up with something that's not quite a circle.

  4. Undo your drawing with the back arrow button at the top of the drawing canvas. When things go wrong, you can always go a few steps back. You can even clear the entire screen (using Clear) and start over.

  5. To create a perfect circle, hold Shift while dragging the mouse. Don't make your circle too big. It has to be able to move about the stage freely without bumping into the edges all the time.

  6. Next, click on the crosshair button at the bottom of the toolbar. This button lets you center your image. Now click on the center of your cannonball.

  7. We name the new sprite cannonball.

Your cannonball is now done and ready for business. It will look like a simple grey dot as in this screenshot:

Let's move on to creating a cannon to shoot from. The cannon will consist of two parts: the back of the cannon, which serves as the pivot point, and the barrel. The following are the steps to create them:

  1. Create a new sprite by clicking on the paintbrush icon.

  2. Start again by creating a circle. This circle should be slightly larger than your cannonball.

  3. Next, select the Rectangle tool that is right above the Ellipse tool.

  4. Draw a rectangle that is as high as the circle but about three times as wide.

  5. Click on the Select tool and drag the rectangle to overlap the right half of the circle.

  6. Make sure that the center point of the cannon is placed at the center of the circular element, near the back of the cannon.

  7. We name this sprite cannon.

  8. Just keep in mind that the cannon consists of two separate shapes. You can color them separately, or you can color them together by first selecting both the shapes while holding the Shift key.

Objective complete – mini debriefing

We've now got ourselves a cannon and some ammunition to shoot with.

Starting scripts


Let's have some fun making the cannon shoot its cannonball. It's always a good idea to script and test the interactive parts of your game as early as possible. Without scripts, it's just a bunch of pretty pictures! They might be nice to look at, but they won't keep the player entertained for long.

Engage thrusters

We have two objects to script. Object is an official programmer word that means something that performs an action in a program.

In this case the objects are visible. Our sprites are our objects. We have a cannonball and a cannon. The player will be able to control the direction of the cannon. The cannonball will fly away in a certain direction based on which way the cannon is pointing. So the way things are controlled is:

player → cannon → cannonball

Let's create a short script for the cannon. This script will save the direction the cannon is pointing to, so that the cannonball will know in which direction to fly.

We have to create a variable to store the direction of the cannon. If you're unfamiliar with variables, read the information box on the following page. To create a variable, follow these steps:

  1. Click on the Data category. This is where you can create variables.

  2. We will now click on the Make a Variable button.

  3. Name the variable direction and make it available for all sprites.

  4. We start the program with the when <green flag> clicked block. This is the easiest way to set any program in motion.

  5. Underneath it, we will place a forever block, because we will check the cannon's direction indefinitely.

  6. If you want, you can tick the checkbox to make the variable visible on stage. Then, you can see the direction that the cannon is facing in, at all times.

  7. Put a set () to () block in the forever block and select direction.

  8. View the Motion category and look down at the list of blocks to find the built-in cannon direction variable. Place it in the open space. It may look superfluous to send the built-in variable value to a self-made variable. We do this because Scratch can't send built-in sprite variables to other sprites directly. Our self-made variable can be used in all sprites.

This is all the scripting that has to be done for the cannon. The following is the finished script:

Note

About variables

Variables are an important part of programming. They allow you to store information for later use and to transfer information between different objects. A variable consists of two things; a name by which it is recognized and the word/number/object that it stores.

The easiest way to think about it is to compare the variable to a jar of pickles in a grocery store. The store clerk is the computer. He handles this jar and all the other jars that are available in the store. The jar is a variable.

On the face of it they all look the same, like glass containers. It's hard to distinguish one jar from another. That's why every jar has a label with a word on it. This is the name of the jar/variable. Most probably, the name of the jar will say something about what's in the jar. The jar of pickles, for example, will be called "Pickles".

You move up to the counter and ask the clerk, "How many pickles are in the Pickles jar?" and the clerk checks the jar, counts the pickles, and says, "There are 9 pickles in the jar." You now know something about the content of the Pickles jar. You feel like having a snack and decide to buy two pickles. After you paid and received the pickles, you ask again, "How many pickles are in the Pickles jar?" and the clerk counts the contents of the jar again (just to make sure) and answers, "There are 7 pickles in the jar."

It's most common to store numbers in a variable, because computers like to work with numbers, but variables can also contain names or even whole objects. Scratch keeps it simple, though. Scratch variables can only contain numbers or names/words.

Perhaps, it's better to illustrate the explanation of variables with the following screenshot:

We will go on to create a script to move the cannonball:

  1. Click on the cannonball sprite to open its script editor.

  2. The cannonball will also be triggered with a when <green flag> clicked block. Its actions will also be contained inside a forever loop.

  3. Place a move () steps block inside the forever block. That's the basic necessity to set the sprite in motion.

Now we build a few more controlling scripts, so the cannonball actually goes where we want it to go:

  1. Place a go to () block on top of the move () steps command and select cannon. This makes the cannonball hop back to its starting position.

  2. Make the cannonball copy the cannon direction with a point in direction () block and by insetting the direction variable. Note that this is our added variable (orange background) from the Data category, not the built-in (blue background) variable from the Motion category. The variable with the orange background is the saved cannon position. In this case, the variable with the blue background is the current direction of the cannonball, which wouldn't change anything when applied to itself.

To make the cannonball move forward, instead of constantly resetting, we use another kind of loop with a condition:

  1. Put a repeat until () block around the move command.

  2. Then, place a touching () condition block in the vacant space and select edge.

Now the cannonball will angle itself in the same direction as the cannon, and it will keep moving forward until it reaches the edge of the stage. At that point, the script repeats and the cannonball is reset to its starting position in the cannon. The following is the completed script:

We're not building any fancy controls at this point. Click on the i button in the top-left corner of the sprite in the Sprites window:

This will switch the sprites view to the sprite properties screen. Here you can view and edit some information about your sprites. An important one is the sprite name; you can name the sprite here if you didn't already do so in the sprite editor during its creation. Notice the sprite name in the top field of the properties screen:

What we are really looking for at this moment is the little direction tool located on the right side of the window.

Objective complete – mini debriefing

Click on and drag the little blue pin to change the direction that the cannon is facing in. Try it and see how the cannonball shoots in different directions depending on the direction of the cannon.

Don't forget to click on the green flag at the top of the stage (if you haven't already) to activate both scripts!

Adding targets


This game will be no fun without something to shoot at and blow up. So, we are going to create some targets for the cannonball to hit. We will first draw a new sprite. Then, we are going to use a very cool new feature of Scratch 2.0: the ability to create copies of a base object. This can save a lot of time when you want to have multiple objects that work the same way. This is often the case in games. Think of all the enemies you've squashed or all the coins you've picked up in various action games.

Engage thrusters

We will first draw a traditional archery style target, with a circular disk of red and white rings placed on a simple wooden stand, shown as follows:

To create the target, follow these steps:

  1. Create another new sprite with the Paintbrush button.

  2. Select the Ellipse tool and make sure the fill color is red and the border color is white.

  3. Adjust the line thickness to create a fairly thick line.

  4. Draw a vertical oval shape.

Don't worry too much about the size. We will adjust the proportions later. It's easier to draw big shapes first, so you can easily see the details and relative placement. When the drawing is complete, you can scale it down to the desired size. First, we need to create two more oval shapes.

Method 1

The first method to create these shapes is as follows:

  1. Click on the Ellipse tool.

  2. Place your cursor over the existing oval at the top-left edge of the red fill.

  3. Click on it and drag to the lower-right edge of the red fill to draw another oval. This oval will fit neatly inside the first one.

  4. Repeat these steps to create a third, even smaller oval.

Method 2

The second method to create these shapes is as follows:

  1. Click on the Duplicate button in the toolbar.

  2. Click on the oval shape you have already made.

  3. When you move the cursor, you will see a transparent "ghost" of the circle, moving along with the cursor.

  4. Click anywhere on the drawing canvas to place a copy of the oval there.

  5. Use the scaling widgets you see around the shape when it's selected, to scale the copied circles down to the right size.

  6. Drag them inside each other to create the finished target disk.

Now that we have our oval shapes, we can continue building our target!

  1. Click on the appropriate sample from the color swatches to change the line color to brown.

  2. Click on the Line tool and draw a vertical line, about as high as the target disk.

  3. Draw another line diagonally down from the upper tip of the first line.

  4. The two legs of the target stand are complete.

  5. Click on the Select tool and drag a box around the entire target disk. This will select all three shapes as a single object.

  6. Click on and drag the rotation pin at the top of the selection box and rotate the disk upward.

  7. Click on and drag the shape over the target stand. The center of the disk should line up with the top of the stand.

    Note

    About layers

    Perhaps, your shapes are overlapping in the wrong way, with the stand on top of the disk, instead of underneath it. This means that the shapes are sorted in the wrong order. A Scratch drawing consists of separate layers, like sheets of transparent papers stacked on top of each other. The sheets on the top will cover the sheets underneath. This way you can create the illusion of depth, by placing objects that should be far away at the bottom of the stack.

  8. Change the order of shapes with the Forward a layer and Back a layer buttons, if needed.

  9. Select the entire drawing by dragging a box around it with the Select tool.

  10. Scale the entire drawing down to the desired size. You can scale proportionately (horizontally and vertically, evenly) if you hold a corner widget while dragging.

Creating multiple targets

We will write a script for the target we just drew; this script will place copies of the object at random locations on the stage. To do this we will use the new clone block. This is one of the most exciting new features of Scratch 2.0. Instead of manually copying your sprites N number of times, you can just use a script to do this work for you. It can save a lot of time when creating and editing objects.

  1. This script will start with a when <green flag> clicked block, just like the earlier ones.

  2. Attach a go to x: () y: () block. Fill in the numbers -100 and 0.

    Note

    About X-Y coordinates

    X stands for the horizontal position, that is, how far left or right something is. Y stands for the vertical position, that is, how high or low something is. This way the computer can easily save the position of any object on the stage. Look at the bottom-right corner of the stage. Here you will see the current position of the mouse shown as X and Y coordinates. This can be a helpful tool when deciding where you want objects to appear on stage with a script. Just point to the right place, look at the numbers, and put them at the right places in the script.

    The center point of the Scratch stage has the coordinates (X:0,Y:0). The horizontal positions range from -240 to +240. And the vertical positions range from -180 to +180. If you look at the assignment for the previous target, you will notice that the target is placed somewhat left of the center (-100) and on the center line vertically (0).

  3. Next, add a show block. Yes, the sprite is already visible now, but at the end of the script we will make it disappear. This block makes sure it appears again in time when the script runs.

We are going to make five target clones. We will let the target sprite step right five times and create a clone of itself at each step.

  1. Attach a repeat () block and fill in 5.

  2. Inside the repeat () block place a move () steps block.

  3. Instead of a fixed number, use a pick random 20 to 80 block to make the spots where a target will appear a little unpredictable and more interesting.

  4. Then, attach the new create clone of () block underneath the move command inside the repeat block. Select myself.

  5. Finally, use the hide option on the original sprite. Place this block at the end, outside the loop.

So now we have a cannon, a cannonball, a bunch of randomly created targets, but still no exciting game. The cannonball can fly through the air, but it doesn't do anything when hitting a target; it just passes right through. This can be easily fixed.

We'll continue scripting the target first. After a clone is created, you can start running a script on the clone. This is a new way of initiating a script.

  1. Start a new script in the target object with a when I start as a clone block.

  2. Attach a wait until () block. This will pause the script until something happens.

  3. Place a touching ()? condition block inside the slot. Select cannonball.

  4. The next step is to attach a wait () secs block.

  5. Fill in a very short time of 0.05 seconds. This might seem a little useless, but it will give the other scripts (specifically the cannonball script in this case) time to respond before the target disappears.

  6. The last step is to delete this clone.

Cannonball collisions

The targets disappear when hit by the cannonball, but the cannonball can go on through multiple targets. This makes the game a bit too easy. It would be better if the cannonball is stopped by hitting a target as well. So a new cannonball has to be aimed and shot for each target.

Making the cannonball disappear on contact with a target just requires a little addition to the existing script. The cannonball is already reset to its original position when hitting the stage edge. We can use this already existing script and also check for hitting a target.

  1. Click on the cannonball sprite in the Sprites view to see its scripting panel.

  2. Grab an () or () operator block.

  3. Pull the touching <edge>? block from the script and place it in one of the () or () slots. It doesn't matter which one.

  4. Also get a new touching ()? block. Place it in the other slot and have this condition checking for target. (Have you already properly named your target sprite?)

  5. Place this entire conditional structure in the now vacant condition slot in the existing script.

The cannonball gets reset when it touches the edge or a target. It doesn't matter that the target is a clone. It is still called a "target".

Objective complete – mini debriefing

Currently the cannonball is moving on in a straight line. In reality, a cannonball doesn't move like that (but we'll be fixing this). It is heavy, and what goes up must come down. You can try it yourself with a ball or a stone. Throw it upwards in front of you and see what happens. Just be careful with the neighbor's windows!

Creating a parabolic shot


The ball will move upwards in the direction you threw it. At some point it will start to slow down, stop, and then start falling down. The path the ball follows is called a parabola. This is what we expect of gravity. It's always around us, so we don't pay too much attention to it. If you would throw the ball in space, which has no gravity, the ball would move on forever in a straight line, as it does now in our game. On Earth, the ball will move up for a while, then slow down, and eventually fall down again. This movement path is described in the following diagram:

In this case, the cannon and cannonball should be on the ground, so we want to simulate some gravity. Not only will the parabola trajectory look more interesting, it will also make the game more challenging. You could try hitting a target by shooting the cannonball at a steep angle and have it hit a target as it drops down. It is very useful to shoot over the hills, which we will do in the last stage of this project.

Engage thrusters

To simulate gravity, you could use a realistic mathematical formula. But it can be hard to figure out, and in a simple game, it often isn't needed. We are going to create a good-looking parabola trajectory with just a simple calculation and some trickery.

To simulate the pull of gravity, we are going to use the built-in timer variable. This timer will start counting seconds when the game is started, but we can reset it to start counting again. We will be using the increasing number as a constantly increasing pull, which will eventually start dragging the cannonball downwards.

The steps to create the trajectory are as follows:

  1. We select the cannonball sprite to add to its scripts.

  2. After the move () steps command, add a change y by () block. This will cause the cannonball to vertically move a bit after taking its steps.

  3. Place a () * () (multiplication) operator in the box.

  4. Then put the timer variable in one of the operator slots.

  5. In the other slot, fill in a number manually. Try a few numbers, just for the fun of it, and see what happens.

    In my opinion, the number -5 has the best result. But if you disagree, you're free to choose another number. Just make sure that the number is negative, because a positive number will cause the cannonball to float ever faster upwards.

  6. To reset the timer after the cannonball has hit something, add a reset timer block at the start of the loop.

Objective complete – mini debriefing

Test the game again and turn the cannon to point at different angles. See how the parabolic trajectory of the cannonball responds.

Creating a landscape


As the final stage of this project we will create a hill for the targets to sit on. The landscape will have a diagonal slope; we have to change the parabola trajectory to shoot at different points on the hill. The finished game will look like the following screenshot:

Engage thrusters

We could manually draw landscapes as sprites. But if we want to create many different levels, it could take a lot of work. Instead, we will make a drawing tool to create the hill.

  1. First, create a copy of the cannonball by right-clicking on the sprite in the Sprites view and choosing duplicate, shown as follows:

  2. Click on the i button on the copied sprite and change its name to drawing tool.

  3. Throw away the scripts in the copied sprite. Those are only useful for the cannonball, not for the drawing tool.

  4. Switch to the Costumes tab and change the color of the drawing tool to dark green using the color swatches. This is mostly to make it visually different from the cannonball, so that we don't confuse the two.

  5. Go back to the Script tab so that we can create a new script for the drawing tool.

  6. We start the script again with a when <green flag> clicked block.

  7. Attach a pen up block to make sure the tool doesn't draw anything while moving to its starting point.

  8. Add a clear block. This might not look useful now, but like with the hide and show commands in the target sprite script, this will help clear the screen once we want to restart the game.

  9. Move the tool to its starting point with a go to x: () y: () block.

  10. Fill in 240 after x and 0 after y, so the tool starts at the right edge of the stage.

  11. Next, set the pen size to 5 using a set pen size to block. Again you might want to create a thinner or thicker line.

  12. Choose a green color for a natural-looking hill in the set pen color to … block.

  13. Place the drawing tool on the stage with a pen down block. We are now ready to start drawing the landscape.

  14. Then, we move the pen diagonally to the bottom edge with a go to x: -100 y: -180 block. Because the pen is down, it will draw a line between its start and end point.

To make full use of our newly drawn landscape, we have to set the targets down on them. But how do we do that on such an uneven surface? The solution is to slowly move the targets down and use another collision test to decide when the targets have reached the landscape and should stop moving. We add the following script to the target sprite:

The steps to perform this test are as follows:

  1. Click on the target sprite so you can view its scripts.

  2. Add a repeat until () block at the start of the clone script.

  3. Inside the repeat until loop place a change y by () block and fill in a negative number to make the targets move down.

    I filled in the number -4 for a fairly slow speed. You may take bigger steps, but then the targets could end up being stuck partly through the landscape. Not a big issue, but it might not look as nice.

  4. To stop the targets from moving when they reach the landscape, add a touching color ()? condition to the repeat until () block.

  5. Click on the color box and then point and click on the green line that you've drawn.

Computers are very precise about color. Keep this in mind if your color collision doesn't work. Most likely, the actual color of the object will be slightly different from the color that you checked for. You can't see it with the naked eye, but the computer can tell the difference based on the color number. The finished script should look like the following screenshot:

As a final step, change y: 0 to y: 180 in the other target sprite script. This will place the target at the top of the stage and make sure that it doesn't end up inside or underneath the landscape.

Now that we have another object on the stage, that is, the landscape, there is one more thing we have to do to finish the game. When the cannonball hits the ground, it should stop instead of moving straight through the landscape. This is similar to the addition we added after including the targets. Now we only need to add another collision check for the cannonball to respond to.

The following are the steps for this collision check:

  1. Get another () or () operator block.

  2. We will check for hitting the green landscape color, just like we just did with the targets.

  3. In the other slot, we will place the entire condition check, like we made earlier. So our latest () or () block will become the outermost block in the construction.

  4. Place the entire construction back in the repeat until () slot and we're done.

The cannonball will now respond to hitting the stage edge, a target, and the landscape.

Objective complete – mini debriefing

That's it! We should now have an automatic landscape complete with a functioning cannon, firing script, and targets.

Mission accomplished


Your first game is now done, well, sort of. You learned how to draw sprites and how to add scripts to them to make them interactive. We used the new cloning feature to quickly copy the same sprite, including its functionality. We worked with collisions between objects, some variables, and simulated gravity to create a simple, but challenging game. The finished game will look like the screenshot that follows:

Hotshot challenges


It's still far from the Angry Birds example that we mentioned at the start, but all the basic elements are there. Test your game, and play with the numbers a bit to see how they can affect the playability! Have a go with the following tasks:

  • If you increase the cannonball speed to very high, it will become very fast, but hard to control.

  • Try increasing or reducing the number for the simulated gravity effect.

  • Do you still know which number that is? It is somewhere in the cannonball script.

  • Can you change the number so it feels like the game takes place on the moon, where gravity is not as strong as it is on Earth?

In later projects, we will look back at this game and you will be challenged to expand and improve it, based on the things you will learn in those projects. The game might not look like anything special just yet, but with some effort and imagination, you could make it into an exciting game to rival Angry Birds.

Left arrow icon Right arrow icon

What you will learn

  • Draw and edit game graphics
  • Construct scripts from logic blocks
  • Utilize operators and conditions to steer game actions
  • Use variables and lists to save and reuse dynamic numbers
  • Create both mouse and keyboard controls for various purposes
  • Implement natural physics effects such as collisions and gravity
  • Invent and build powerups
  • Learn how to use some advanced math, for better looking movement patterns
  • Make interesting level designs
  • Balance the game for an enjoyable experience
  • Reuse elements to speed up the building process

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 21, 2014
Length: 330 pages
Edition :
Language : English
ISBN-13 : 9781849697569
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Feb 21, 2014
Length: 330 pages
Edition :
Language : English
ISBN-13 : 9781849697569
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 153.97
Scratch 2.0 Beginner's Guide: Second Edition
$54.99
Scratch 2.0 Game Development Hotshot
$43.99
Scratch Cookbook
$54.99
Total $ 153.97 Stars icon

Table of Contents

10 Chapters
Blowing Things Up! Chevron down icon Chevron up icon
Beating Back the Horde Chevron down icon Chevron up icon
Start Your Engines Chevron down icon Chevron up icon
Space Age Chevron down icon Chevron up icon
Shoot 'Em Up Chevron down icon Chevron up icon
Building a Worthy Boss Chevron down icon Chevron up icon
Creating a Level Editor Chevron down icon Chevron up icon
Dungeon Crawl Chevron down icon Chevron up icon
Hunger Run Chevron down icon Chevron up icon
Sprites with Characters Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(14 Ratings)
5 star 64.3%
4 star 21.4%
3 star 7.1%
2 star 7.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Patrick Edmondson Apr 19, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book to learn intermediate and advanced Scratch coding.
Amazon Verified review Amazon
L Chen Feb 28, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is very well written, very educational and most importantly easy to understand and follow.My kids grab the book after I had a chance to read it and started making games. The book has clear, step by step instructions for building different projects.It is one of the most engaging, educational and fun books I have read in years. Highly recommended. A+++
Amazon Verified review Amazon
Alan Aug 15, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
We loved this book. My 10 year old and I wrote games that we never imagined we could write. I am not a programmer and can not comment on "technique" but we had tons of fun and learned a whole lot about programming. This is a great introduction to programming.
Amazon Verified review Amazon
Amish Bhavsar Apr 16, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have personally taught Scratch to a number of students and have always been keeping an eye out for some well structured Scratch training material. In this process, I have seen a number of books, websites, videos and everything else. Nothing comes close to this book.Jessica has nailed it with the Scratch 2.0 Game Development book. It is comprehensive, has tons of examples - that you can even download, covers almost all aspects of Scratch and is fun to use!I must buy for anyone interested in Scratch.2 thumbs up!!
Amazon Verified review Amazon
Gabriela Apr 06, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
At this guide the authors develops ten projects completely detailed. First they develop the objectives of the game and then they explain the role of sprints and detailed functionality of each script, even these are shown with screenshots.They use clear vocabulary for children and also introduce the specific terminology of programming languages.Scratch 2.0 Game Development HOTSHOT is an excellent guide to make Scratch projects. I began to use it to programming games with my students and also I recomended them this book to read and awaken your creativity.En esta guía los autores desarrollan diez proyectos completamente detallados. En primer lugar se desarrollan los objetivos del juego y, a continuación, explican el papel de los objetos y la funcionalidad detallada de cada script, incluso éstos se muestran con capturas de pantalla.Utiliza vocabulario muy claro para los niños pero a la vez los introduce en terminología especifica de lenguajes de programación.Scratch 2.0 Game Development HOTSHOT es una excelente guía para realizar proyectos con Scratch. Comencé a utilizarla para programar juegos con mis alumnos y también se las recomendé a ellos para que la lean y despierten su creatividad.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.