انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents

Try it and make it better

Section 13: The final project: catch the appleLesson 13.3 · ⏱ 15 min
While playing: 5 apples and one heart left
While playing: 5 apples and one heart left
The hearts ran out: game over
The hearts ran out: game over
We tapped “Again” and it started from the beginning
We tapped “Again” and it started from the beginning
🖥️ What happens on the stage?
We played in the lab: we caught the apples, and “New level! 🚀” appeared after 3 apples, then we let the apples fall until “Game over!” appeared, then we tapped “Again”.
  1. Add a 💣 bomb that falls too: if the basket touches it you lose a heart.
  2. Keep the best score in a variable and show it.
  3. Change the screen colour at every new level.
  4. Open your game on your phone, and play it by tilting (lesson 12-1).
💡 Tip
Build one step, then run it and make sure it works, then add the next.

📌 Another example: levels

Every 3 apples: the apple is faster, and a “New level” message.

The design
The design
The blocks
The blocks
In the lab: a new level
In the lab: a new level
✍️ Practise
Make the example yourself: put the parts in “🎨 Design”, then the blocks, and tap ▶ Run.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

An “Again” button that resets the points and the hearts.

👀 Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: everything went back to the start.

Medium

A golden apple 🌟 is worth 5 points (a second apple).

👀 Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: two apples fall, and the golden one is worth 5.

Hard

The phone vibrates when you lose a heart.

👀 Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: it vibrates with every apple that falls.

Finished the lesson? Mark it so your progress counts.