انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents
Robo Block: home
0. Lab tour1
1. Getting started5
2. Motion5
3. Looks and sound5
4. Events4
5. Loops5
6. Conditions and sensing4
7. Variables and randomness4
8. Project: the “Catch Robo” game3
9. Messages: characters talk to each other4
10. Clones: one character, many copies4
11. My Blocks: make a new block3
12. Operators and time4
13. The pro project: a jumping game4

The stage and coordinates: x and y

Section 2: MotionLesson 2.2 · ⏱ 7 min

Every place on the stage has an address of two numbers: x for right and left, and y for up and down. The middle of the stage is x = 0 and y = 0.

  • Positive x: right of the middle; negative x: left of the middle.
  • Positive y: above the middle; negative y: below the middle.
Blocks: when 🚩 clicked, go to x: (0) y: (0), wait (1) seconds, go to x: (150) y: (100), wait (1) seconds, go to x: (-150) y: (-100)
🖥️ What happens on the stage?
Robo jumps to the middle, then to the top right, then to the bottom left, waiting one second between jumps.
The stage after running the program in Robo Block
💡 Tip
Put the mouse over the stage: it shows you the x and y of the place you point at.

📌 Another example: train stations

y stays the same (-60) at every station, and x grows by 100 at each station, so Robo moves in a straight line to the right.

Blocks: when 🚩 clicked, go to x: (-150) y: (-60), say (Station 1) for (1) seconds, go to x: (-50) y: (-60), say (Station 2) for (1) seconds, go to x: (50) y: (-60), say (Station 3) for (1) seconds, go to x: (150) y: (-60), say (Last station 🚉) for (2) seconds
The first station
The first station
The second station
The second station
The last station
The last station
✍️ Practise
Make Robo visit the four corners of the stage.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Make Robo go to the middle, then after one second to x = 100 and y = 0.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (0) y: (0), wait (1) seconds, go to x: (100) y: (0)
x = 100
x = 100
Medium

Make Robo go to the top of the stage, exactly in the middle.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (0) y: (140)
x = 0 and y = 140
x = 0 and y = 140
Hard

Make Robo visit three places (left, top, right), then come back to the middle, with half a second between jumps.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (-150) y: (0), wait (0.5) seconds, go to x: (0) y: (120), wait (0.5) seconds, go to x: (150) y: (0), wait (0.5) seconds, go to x: (0) y: (0)
Back in the middle
Back in the middle
Finished the lesson? Mark it so your progress counts.