Game tutorial · Clicker

How to make a clicker game in Scratch (step by step, with an AI helper)

Clicker games look simple – click a big object, get points – but they hide real maths: prices that grow, upgrades that change how many points each click is worth and helpers that earn points every second. That makes a clicker a great project for practising variables. In this guide you build one in Scratch 3 with a bounce effect, an upgrade shop and an auto-clicker, and see where Bee, the AI buddy in Enimist's Maker Studio, can help.

Plan the variables

A clicker is mostly variables. Make four (For all sprites): “score” – the points you have; “per click” – how many points one click gives; “price” – what the next upgrade costs; “auto” – points earned every second by helpers.

Set them at the start in one place, so every new game begins the same way. Show “score” on the stage; you can show the others too while testing.

Blocks
when green flag clicked
set [score] to (0)
set [per click] to (1)
set [price] to (10)
set [auto] to (0)

The thing you click

Make a big, friendly sprite in the middle of the stage – a honey pot, a cookie, a star. When it is clicked, add “per click” to the score (not just 1 – that is what makes upgrades work).

Add a little bounce so each click feels good: shrink the sprite a bit and grow it back. Small effects like this are a big part of why clicker games are fun.

Blocks
when this sprite clicked
change [score] by (per click)
change size by (-10)
wait (0.05) seconds
change size by (10)
start sound (Pop)
Bee drawing a costume from a description (Vietnamese interface shown)
Bee drawing a costume from a description (Vietnamese interface shown)

Tip: Ask Bee's “Draw for me” chip for the clickable object (“a shiny honey pot”) and the “Make a sound” chip for a satisfying click sound.

An upgrade shop with rising prices

Make an “Upgrade” button sprite. When clicked, it checks if you have enough points. If you do, it takes the price away, adds 1 to “per click” and makes the next upgrade more expensive – multiplying the price by 1.5 and rounding keeps the game balanced for a long time.

If you can't afford it, the button says so. Never let the score go below zero – the “if” check is what prevents that.

Why multiply by 1.5 instead of adding a fixed amount? If every upgrade cost the same, players would buy dozens in a row and the game would be over in two minutes. Growing prices mean each upgrade feels like a real decision: save up for the next one, or spend now on something cheaper. Real clicker games tune these numbers for weeks – try 1.3 for an easier game or 2 for a much harder one, and play it yourself to feel the difference.

Blocks
when this sprite clicked
if <not <(score) < (price)>> then
  change [score] by ((0) - (price))
  change [per click] by (1)
  set [price] to (round ((price) * (1.5)))
else
  say (Not enough points yet!) for (1) seconds

Auto-clickers that earn every second

Make a second shop button, “Helper”, that costs more (for example 50 points, growing ×2) and adds 1 to “auto”. Then one loop on the Stage adds “auto” to the score every second, forever.

Now the game keeps growing even when nobody is clicking – that is the moment a clicker becomes hard to put down.

Blocks
when green flag clicked
forever
  wait (1) seconds
  change [score] by (auto)

Show prices on the buttons

Players need to see what things cost. Make the Upgrade button say its price all the time with a forever loop and the join block: “Upgrade: 15”. Do the same for the Helper button.

Finally, add a goal so the game can end – for example when score is greater than 1000, switch to a “You win!” backdrop and show the time from the timer.

Blocks
when green flag clicked
forever
  say (join (Upgrade: ) (price))

Stuck? How the AI buddy can help

A common bug: the score goes negative after buying. Ask Bee in the Maker Studio: “Why can my score go below zero?” Bee sees your blocks and points to the missing check.

Want Bee to build it? Type what you want – “add a shop with three different upgrades” – and Bee reads your project, prepares the change as a draft card (“Bee will: add 3 script(s)”) and waits. Tap Apply to put it in your project, or Discard; after applying, Undo puts everything back. Then tap “Done” to see how much of the game you made yourself.

Bee answering a question with a picture of the blocks (Vietnamese interface shown)
Bee answering a question with a picture of the blocks (Vietnamese interface shown)

Scratch is a project of the Scratch Foundation, in collaboration with the Lifelong Kindergarten Group at the MIT Media Lab. Enimist Studio is not affiliated with Scratch or the Scratch Foundation.

Ready to make a first game?

Open the Maker Studio on a computer – Bee will be there from the very first block.

More guides