Coding, AI & game designAges 8–144 min read

By Charlotte ·

How to Make a Pokémon-Style Battle Game in Scratch

A step-by-step guide to coding a turn-based, Pokémon-style battle game in Scratch: creatures, health bars, moves, turns and a win screen.

How to Make a Pokémon-Style Battle Game in Scratch

Turn-based battles are one of the best Scratch projects for children who love monster-collecting games. The idea is simple: two creatures take turns choosing moves until one runs out of health. Building it teaches variables, broadcasts and decision-making in code.

Quick takeaway

A turn-based battle needs five things: two creature sprites, a health variable for each, buttons for moves, a way to pass the turn, and a check for who has won. Build them in that order and test after each step. Design your own creatures and names; it is more fun and it keeps the project original.

Before you start

  • A free Scratch account, or the offline editor.
  • Two creature drawings of your own, made in the paint editor.
  • About an hour for the first working version.

New to Scratch? Read how to get started with Scratch first.

Step 1: Creatures and health

  1. Draw or import two sprites: your creature on the left, the opponent on the right.
  2. Make two variables for all sprites: My HP and Enemy HP.
  3. When the green flag is clicked, set both to 50.
  4. Tick the variables so they show on the stage, and drag them above each creature.
1-on-1 Advanced Scratch Coaching: Clones, Lists and Custom BlocksA live class on this1-on-1 Advanced Scratch Coaching: Clones, Lists and Custom BlocksAges 10–15

Step 2: Move buttons

Make two button sprites, for example Tackle and Spark. Give each a different effect.

  1. When the Tackle button is clicked, change Enemy HP by -8.
  2. When the Spark button is clicked, change Enemy HP by a random number from -4 to -14.
  3. After either move, broadcast a message called enemy turn.
Why random?

A move that sometimes hits hard and sometimes barely hits makes players think about which button to press.

Step 3: Taking turns

  1. Make a variable called Turn and set it to player at the start.
  2. Only let the buttons work if Turn equals player.
  3. When the opponent receives enemy turn: wait one second, change My HP by a random number from -5 to -12, then set Turn back to player.

Add a short animation so the battle feels alive: glide the attacker ten steps forward and back, and make the creature that was hit flash by changing its ghost effect.

Step 4: Winning and losing

  1. After every change to health, check if Enemy HP is less than 1.
  2. If it is, broadcast you win, show a win backdrop and stop all scripts.
  3. Do the same check for My HP and a lose backdrop.
Common bug:

The battle carries on after someone has won. Put the health check before the broadcast that passes the turn.

Make it your own

  • Add a Heal move that restores health but uses your turn.
  • Give creatures types, so some moves do double damage.
  • Limit strong moves to three uses with another variable.
  • Add a second opponent that appears when the first is beaten.

More ideas for next projects are in our list of Scratch project ideas.

What parents can do next

  1. Let your child design the creatures and name the moves.
  2. Build one step at a time and test after each.
  3. Ask them to explain how the turn variable works.
  4. Share the finished game with a relative to play.

Frequently asked questions

What age is this project for?

Around 8 to 14. Younger children can build it with help; older ones can add types, items and levels.

Can we use real Pokémon characters?

It is better to invent your own. It avoids copying someone else's characters and makes the game truly your child's.

My child gets stuck on variables. What helps?

Show the variable on the stage and watch it change as the game runs. Seeing the number move makes the idea click.

What comes after a battle game?

A platformer or a maze game uses the same ideas with movement added.

Explore next

Learn Scratch with a teacher

Live online Scratch classes, clubs and camps, from first projects to advanced games.

Explore Scratch Coding

Next in Coding, AI & game design

Related courses

Chess Break Camp: Openings and Checkmates to Beat Your Relatives

Chess Break Camp: Openings and Checkmates to Beat Your Relatives

Ms. M.

Ages 7–12 · 45 min · 3 / Week

$20.00per classSee schedule

Roblox Obby in 3 Days: Build and Publish an Obstacle Course (Break Camp)

Roblox Obby in 3 Days: Build and Publish an Obstacle Course (Break Camp)

Vaibhav R.

Ages 9–13 · 55 min · 3 / Week

$20.00per classSee schedule

Code a Turkey Chase Game in Scratch: Thanksgiving Break Coding Camp

Code a Turkey Chase Game in Scratch: Thanksgiving Break Coding Camp

Amreen S.

Ages 8–12 · 55 min · 3 / Week

$20.00per classSee schedule

Build a Thanksgiving Feast World in Minecraft (3-Day Break Camp)

Build a Thanksgiving Feast World in Minecraft (3-Day Break Camp)

Swati R.

Ages 7–11 · 55 min · 3 / Week

$20.00per classSee schedule

Chess Break Camp: Openings and Checkmates to Beat Your Relatives
MM

Ms. M.

Chess Break Camp: Openings and Checkmates to Beat Your Relatives

A three-day chess camp for children who know how the pieces move. They learn a sound opening, three tactics and two checkmates to use in family games over the h…

Intermediate

Level

7–12

Ages

45 min

Duration

3 / Week

Classes

1

Weeks

$20.00per class
See schedule
Roblox Obby in 3 Days: Build and Publish an Obstacle Course (Break Camp)
VR

Vaibhav R.

Roblox Obby in 3 Days: Build and Publish an Obstacle Course (Break Camp)

A three-day Roblox Studio camp where children build an obstacle course with checkpoints, moving parts and a finish line.

Beginner

Level

9–13

Ages

55 min

Duration

3 / Week

Classes

1

Weeks

$20.00per class
See schedule
Code a Turkey Chase Game in Scratch: Thanksgiving Break Coding Camp
Amreen S.

Amreen S.

Code a Turkey Chase Game in Scratch: Thanksgiving Break Coding Camp

A three-day coding camp where children build a complete chase game in Scratch, with a player, a runaway turkey, a score and a timer.

Beginner

Level

8–12

Ages

55 min

Duration

3 / Week

Classes

1

Weeks

$20.00per class
See schedule
Build a Thanksgiving Feast World in Minecraft (3-Day Break Camp)
SR

Swati R.

Build a Thanksgiving Feast World in Minecraft (3-Day Break Camp)

A three-day Minecraft building camp. Children plan and build a harvest village with a feast hall, farm and autumn forest to show their family.

Beginner

Level

7–11

Ages

55 min

Duration

3 / Week

Classes

1

Weeks

$20.00per class
See schedule
Custom Blocks in Scratch: Write Your Own Functions (One Class)
NM

Nikhil M.

Custom Blocks in Scratch: Write Your Own Functions (One Class)

A one-time class for experienced Scratch coders on custom blocks with inputs, the Scratch version of functions in Python.

Advanced

Level

10–14

Ages

55 min

Duration

1 / Week

Classes

1

Weeks

$19.00per class
See schedule
ScratchJr: Make a Character Dance (One Class)
Megha P.

Megha P.

ScratchJr: Make a Character Dance (One Class)

A short one-time class where young children use ScratchJr picture blocks to make a character dance to a recorded sound.

Beginner

Level

4–7

Ages

30 min

Duration

1 / Week

Classes

1

Weeks

$15.00per class
See schedule
Code a Maze Game in Scratch (One Class)
Amreen S.

Amreen S.

Code a Maze Game in Scratch (One Class)

A one-time class for children who know the basics, building a maze game with keyboard controls, walls and a timer.

Intermediate

Level

8–12

Ages

55 min

Duration

1 / Week

Classes

1

Weeks

$19.00per class
See schedule
Scratch Math and Science Makers Club
Club
Sanya S.

Sanya S.

Scratch Math and Science Makers Club

A weekly club where children code a new math or science project each session, such as pattern art, a probability experiment or a weather model.

Intermediate

Level

8–12

Ages

50 min

Duration

1 / Week

Classes

Ongoing

Weeks

$18.00per class
See schedule
Science Simulations in Scratch: Gravity, Orbits and Ecosystems
RY

Rupwati Y.

Science Simulations in Scratch: Gravity, Orbits and Ecosystems

A six-week course in building simple science simulations in Scratch, from bouncing balls and orbits to predators and prey.

Intermediate

Level

9–13

Ages

50 min

Duration

1 / Week

Classes

6

Weeks

$20.00per class
See schedule
Scratch Math Games Camp: Code Quizzes, Dice and Number Puzzles
RK

Rajeev K.

Scratch Math Games Camp: Code Quizzes, Dice and Number Puzzles

A four-day camp where children code their own math games, including a quiz, a dice roller and a number-guessing puzzle.

Intermediate

Level

8–12

Ages

50 min

Duration

4 / Week

Classes

1

Weeks

$20.00per class
See schedule
Draw Shapes with Code: Scratch Geometry (One Class)
PB

Pooja B.

Draw Shapes with Code: Scratch Geometry (One Class)

A one-time class that uses the Scratch pen to draw squares, triangles, stars and spirals while learning about angles and repeats.

Beginner

Level

8–12

Ages

50 min

Duration

1 / Week

Classes

1

Weeks

$19.00per class
See schedule
Advanced Scratch: Clones, Lists and Physics in Six Weeks
Shikha R.

Shikha R.

Advanced Scratch: Clones, Lists and Physics in Six Weeks

A six-week course in advanced Scratch covering custom blocks, lists, clones and simple physics, with a larger final project.

Advanced

Level

10–14

Ages

55 min

Duration

1 / Week

Classes

6

Weeks

$20.00per class
See schedule

100% refund if the first class is not right

Cancel before the second class starts and everything comes back.

Refund policy