How to Make a Clicker Game in Scratch | Tutorial

Alphabets Sounds Video

share us on:

In this lesson, you learned how to create a clicker game in Scratch, where players earn points by clicking on objects, such as an apple, and can use those points to purchase additional items that generate points automatically. The lesson covered selecting sprites, adding sound effects, tracking points with variables, and implementing animations to enhance the clicking experience. By following the steps outlined, you can expand your game with various items and features, making it more engaging and fun to play.
  1. What is a clicker game, and how do you earn points in it?
  2. Why is it important to use variables in your game, like keeping track of points?
  3. How can adding different items, like the orange, make your clicker game more fun?

How to Make a Clicker Game in Scratch

Hey there! Today, we’re going to learn how to make a fun clicker game using Scratch. In a clicker game, you click on items to earn points, and you can use those points to buy more items that help you earn even more points. It’s super fun to play and create! By the end of this guide, you’ll be able to make your own clicker game. Let’s get started!

Choosing Your First Clickable Object

First, we need to pick an object that players can click on to earn points. In Scratch, these objects are called sprites. You can choose any sprite you like. For this example, let’s choose an apple. When you click the apple, it will play a sound and give you points.

Adding Sound to Your Sprite

To make the apple play a sound when clicked, go to the “Sound” category and drag out the “start sound” block. Attach it to the “when this sprite clicked” block. Now, every time you click the apple, it will make a sound!

Keeping Track of Points

Next, let’s make sure you earn points every time you click the apple. We’ll use a variable to keep track of the points. A variable is like a container that holds a number. Create a variable called “points” to count how many points you have.

Drag out the “change points by 1” block and attach it under the “when this sprite clicked” block. This way, each click on the apple will increase your points by one. To start with zero points when the game begins, use the “set points to 0” block and attach it to the “when green flag clicked” block.

Making the Click More Fun

Let’s make clicking the apple more exciting by adding a little animation. Go to the “Looks” category and drag out the “set size” block. Set the size to 110% to make the apple grow a bit when clicked, then set it back to 100% to return to normal size. Add a short wait of 0.05 seconds between these actions to create a quick grow-and-shrink effect.

Adding More Items to Your Game

Now, let’s add another item to your game. This item will cost points to unlock, and once you have it, it will automatically give you more points every second. Let’s choose an orange for this item.

Setting Up the Orange

Create a new variable called “automatic points per second” to track how many points you earn automatically. Use the text tool in the “Costumes” tab to write down the cost of the orange and how many points per second it will give you. For example, the orange might cost 10 points and give you 1 point per second.

If you have fewer than 10 points, the orange should look faded to show you can’t buy it yet. Use the “set ghost effect” block to make it look transparent. When you have enough points, clear the effect to make it look normal. Use an “if else” block inside a forever loop to keep checking if you have enough points.

Buying the Orange

When you click the orange, check if you have at least 10 points. If you do, play a sound, subtract 10 points, and increase the “automatic points per second” by one. This way, if you buy more oranges, you’ll earn more points every second!

Make sure to reset “automatic points per second” to zero when the game starts by adding the “set to 0” block under the “when green flag clicked” block.

Expanding Your Game

You can add more items to your game, like a fruit salad that costs 80 points and gives you 7 points per second. Just update the code with the new values for each item.

That’s it for today! I hope you have a blast creating your own clicker game with different items and themes. Happy coding, and I can’t wait to see what you come up with!

  • What kind of sprite would you choose for your clicker game, and why do you think it would be fun to click on?
  • Can you think of other sounds or animations that would make clicking on your sprite more exciting? How would they make the game more fun?
  • Have you ever played a game where you earn points or rewards? How did it feel to earn more points, and what did you do with them?
  1. Design Your Own Sprite: Use your imagination to create a new sprite in Scratch. It could be anything you like, such as a star, a cat, or even a spaceship! Once you’ve designed your sprite, try adding it to your clicker game. Think about what sound it should make when clicked and how many points it should give. Share your creation with a friend or family member and explain why you chose that sprite.

  2. Point Tracker Challenge: Create a chart or a simple table on paper to track your points as you play your clicker game. Each time you click your sprite and earn points, update your chart. Try to predict how many clicks it will take to reach a certain number of points, like 50 or 100. Discuss with a classmate or family member how close your prediction was and what strategies you used to earn points faster.

  3. Observe and Reflect: Spend a day observing the things around you that require effort to gain rewards, just like in your clicker game. For example, think about how doing chores might earn you an allowance or how practicing a skill helps you improve. Write down or draw a picture of one example and explain how it relates to the concept of earning points in your game. Share your observations with the class and discuss how these real-life examples can inspire new ideas for your game.

Sure! Here’s a sanitized version of the YouTube transcript:

Hi, everyone! It’s Zoë from the Scratch team, also known as Zinnea. Today, I wanted to show you how to make a clicker game in Scratch. If you haven’t played one before, a clicker game is a game where there’s a certain item you can click to get more points, and then there are other items that you can buy to earn even more points. It sounds simple, but they’re really satisfying to play. It’s also fun as a game maker because you can decide what objects the player can unlock. By the end of this tutorial, you’ll be able to create your own game like this. Let’s get started!

First, let’s pick the first object that you want the player to be able to click on. You can hover over it, choose a sprite, and select any object you want for your game. I will pick the apple. Let’s start by making this sprite play a sound when you click it. Go to the sound category, drag out a “start sound” block, and click on that to make the sprite play a sound.

Now, let’s make it so that every time the player clicks on the apple, they get a point. To do this, we can create a variable. In Scratch, a variable lets you keep track of a certain number in your project. Let’s create a variable and call it “points.” Now we can use this to keep track of how many points the player has scored.

To make the player get a point every time they click the apple, drag out the block to change points by one. If you put this block under the “when this sprite clicked” block, now whenever the sprite is clicked, it plays a sound and the points increase by one. We want the points to start at zero when the project begins, so drag out the block to set points to zero and put a “when green flag clicked” block on top. Now, every time you click the green flag, the points start back at zero.

We can also make the click even more satisfying by making the sprite grow and shrink when you click on it. Go to the looks category and drag out the “set size” block. If you set size to 110%, it gets a bit bigger. Set size to 100 to return it to its original size. If you set size to 110, wait for 0.05 seconds, and then set size to 100, it creates a little animation where it grows and shrinks quickly. Attach this under the “when this sprite clicked” block, and now every time you click on it, it does a little animation.

You can also choose your own sound to play when the sprite gets clicked. Click on the sounds tab, then click on “choose a sound” to pick whatever sound you like. Once you’re done with your sound, click on the code tab and select it from the menu.

Now, let’s add the next item in the clicker game. For this item, you have to save up points to buy it. I’ll pick the orange. This is how purchasable items in clicker games work: it will cost 10 points to be able to click on the orange, and when you click on it, you will start automatically getting one point every second. You could click on the orange again to buy another, and then you’d be getting two points every second. This is where clicker games get really fun because you can eventually earn thousands of points every second, allowing you to buy even more expensive items.

To start, we need a new variable to keep track of how many automatic points the player is getting every second. Let’s create a variable and call it “automatic points per second.” Now, let’s click on the costumes tab and use the text tool to write down how much you want this item to cost. I will make the orange cost 10 points and write down how many points per second it will give the player once they buy one. I’ll make it give the player one automatic point per second.

If the player has less than 10 points, we want the orange to appear grayed out because they can’t buy it yet. In the looks category, drag out a “set color effect” block, but instead of color effect, choose “ghost effect.” Set that to 60 to make the sprite look transparent. The “clear graphic effects” block will make the sprite look normal. Drag out an “if else” block and say if the points are less than 10, set the ghost effect to 60 to make it look faded. Otherwise, clear graphic effects to make the sprite look normal. Put this inside a forever loop so the project will always check this condition.

Now, when the game starts, we only have zero points, so the orange looks faded. Once we have 10 points, it looks bright, indicating we can buy it now. Drag out a “when this sprite clicked” block. If the player clicks on the orange, we want to check if they have enough points. If they have less than 10 points, nothing should happen. If they do have 10 points, let’s make it play a sound and take away 10 points from the player.

Now, let’s change “automatic points per second” by one to increase it. If I buy two oranges, I should be getting two points every second. If I have three oranges, I should be getting three points every second. Instead of adding one every second, we want to add whatever the “automatic points per second” variable is.

When the game restarts, we want the “automatic points per second” to start at zero, so add the block to set it to zero under the “when green flag clicked” block. That’s how you can add automatic points to a clicker game.

If you create more objects like the orange, you can have as many items as you want and make them as expensive as you want. For example, if I want the next item to be a fruit salad, it could cost 80 points and give you plus seven points per second. Just make sure to update all the relevant values in the code.

That’s what I wanted to show you today! The link to this project is in the description below if you want to remix it. I hope you have fun making clicker games with your own items and themes. I can’t wait to play them! See you next time, and happy coding!

This version removes any informal language and maintains a professional tone while preserving the instructional content.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?