The KAGAMI mark КАГАМИ
Children's Librarypublished by: East Accelerator Foundationhost: kagami.bgfree for everyone
kagami.bg/en/deca · children's library · lesson · machine-readable viewVERIFIED 2026-10-01 · AI-assisted: yes · reviewed by: teacher and psychologist · 2026-10-01
IDENTITY
id
DB-BL-05 · Your First Game (BG: Първата ти игра)
track
BL · Coding with Blocks · lesson 5
level
Tinkerer (change · fix · combine) · grades 4–6 · ages 10–12
duration
15–20 min on screen + 10–15 min without a screen
school link
Bulgarian curriculum: Computer Modelling, grade 4 — topic 6 "creating educational games" (programme checked 2026-10-01)
publisher
East Accelerator Foundation (Фондация „Източен Акселератор“) · host: kagami.bg
access
free · no account · no data collected · works offline
trust
VERIFIED 2026-10-01 · AI-assisted: yes · reviewed by: teacher and psychologist · 2026-10-01
versions
bg: /deca/DB-BL-05_parvata-igra.html · en: /en/deca/DB-BL-05_parvata-igra.html · parent guide: /en/deca/pomagalo/DB-BL-05_parvata-igra.html
LEARNING OBJECTIVES
KEY CONCEPTS
STRUCTURE
ANSWERS
SAFETY
NEXT

DB-BL-06 · BASIC: How Kids Coded 40 Years Ago · previous: DB-BL-04 · Variables: A Box with a Name

SOURCES · LICENCE
IMPACT METADATA
path
2 · Learning
determinant
economic and social (education)
sdg_target
4.4 · 4.7
who_criterion
effectiveness
impact_type
knowledge and education
TAGS
kidsgrades-4-6block-programmingsequenceloopif-thenvariablegameunpluggedbgen
VERIFIED · 01.10.2026 AI help: yes reviewed by: teacher and psychologist · 2026-10-01

Your First Game

You already know four ideas: order, repeating, “if” and a box with a name. Today you put them together — and a game comes out!

⏱ 15–20 min Tinkerer Coding with Blocks · 5 grades 4–6
You will be able to read a program made of blocks, say where it has order, repeating, “if” and a box, and change the game so that it behaves the way you want.

For parents: a one-page guide — dinner questions and a game without a screen.

01Remember

Think about each question first, then open the answer.

How do you tell a robot “take 4 steps” without writing “step” four times?

With repeating (loop): “repeat 4 times — step”. The blocks do the same thing again and again.

What is the “if… then…” block for?

For a decision (if). Like “if it rains — umbrella”: the block does something only when the condition is true.

What is a variable?

A box with a name (variable). A number sits inside, and you can change it, for example “points = points + 1”.

02Story

In 1972 the company Atari released a game called “Pong”. On the screen there are two little bars and a ball. Each player moves their bar up and down to bounce the ball back.

There are only a few rules. If you hit the ball, it bounces. If you miss it, the other player gets a point. The points are counted in one variable. And the ball flies again and again until the game ends.

See? A few ideas put together — and that is a whole game. Today you do the same with stars.

03Worked example

The game “Catch the Star” is built from these blocks. Each idea has its own colour.

orderrepeat“if”box
when you press ▶ Start
points = 0
repeat 10 times
a star falls from the top, 4 steps down
if the basket is under the star
points = points + 1
say: “The end! Points: …”

Here is one round, step by step:

  1. Order (sequence)

    The blocks go one after another: first the points become 0, then the game starts, and at the end the result is shown.

  2. Repeat (loop)

    The block “repeat 10 times” runs everything inside it ten times. One round is one star.

  3. “If” (if)

    When the star reaches the bottom, the program checks: is the basket under it? If yes — it adds a point. If not — the block does nothing.

  4. Box (variable)

    “Points” is a box with a name. It starts at 0. After two caught stars it holds 2. The number changes, but the name stays.

The computer does not know this is a game. It only follows the blocks — exactly and fast.

04Try it

1 · Predict

The basket is not under the star when it lands. What does the “if” block do?

2 · Run: “Catch the Star”

Press ▶ Start. The star falls down. Move the basket 🧺 with the ◀ ▶ buttons, with the arrow keys (click in the grid first) or by tapping a column. The block that is running right now lights up.

when you press ▶ Start
points = 0
repeat 10 times
a star falls from the top, 4 steps down
if the basket is under the star
points = points + 1
say: “The end! Points: …”
round: 0 / 10points: 0points per star: 1

The game runs only on this page. Nothing is sent and nothing is saved. It ends after 5 or 10 rounds, and you can start it at most 3 times per page.

3 · Change

Change one setting and play again. First predict: if you catch 4 stars and each is worth 3 points — how many points will you have? Check it.

Points per star:
Rounds:
Speed:

The settings are like the blocks: you put other numbers into “repeat” and “points + …”, and the game changes. What happened to the points? What happened when you changed the speed?

05No screen: “Catch the Star” on paper

You need: a sheet of paper, a pen, a bottle cap (the basket), a die and one more person.

  1. Draw 5 squares in a row and number them 1 to 5. Put the cap on square 3. On another sheet write: points = 0.

  2. One round: you move the cap at most one square left or right. Then the other person rolls the die. The number is the star's column. If it shows 6 — roll again.

  3. If the cap is on the same square — cross out the old number on the points sheet and write the new one (points + 1). If not — do not touch the sheet.

  4. Repeat the round 10 times. Then say out loud: “The end! Points: …”

  5. Invent a new rule: for example, on squares 1 and 5 a star is worth 2 points. Which blocks of the game does that change?

06Make your own

Invent your own game with the same four ideas.

Draw the blocks on paper, each in the colour of its idea, and show someone at home how your game works.

💡
Want to build it on a screen?
Ask an adult and open Scratch together — a free place for programs made of blocks, created at MIT and now run by the Scratch Foundation. It is another website, not ours: read what it says there and do not type personal details.

07What I learned

The game says “time for a break” when it ends. How do you know when it is time for a break?

Check yourself

1. Which block makes the program do the same thing again and again?

2. What does the block “if the basket is under the star” do?

3. What is “points” in our game?

Skill badge: “I make a game with blocks”
It is yours when you can show someone where the game has order, repeating, “if” and a box. No points and no rankings — just a skill.

08I have a question

Do you still have a question? Write it here. It goes to your parent, not to strangers. Your parent confirms their e-mail first.

The form is loading… If it does not appear, write your question on paper and show it to a parent or teacher.

·Sources