Remember: turning happens on the spot. Left and right are from the robot's point of view!
A gentle introduction to programming. The robot stands on a grid with walls, and its battery is somewhere else on the board. You can't steer it directly: instead you write a program from three blocks, forward, turn left and turn right, and then press Run to watch the robot follow your instructions one step at a time. If it bumps into a wall or stops in the wrong place, change the program and try again. Every level is generated and checked by the computer, which also finds the shortest program, so you know how many blocks you need for three stars.
| Tap a block / ↑ ← → | Add it to the program |
| Tap a block in the program / Backspace | Remove it |
| ▶ Run / Enter | Run the program |
Robot Code teaches the most important idea in programming: a computer does exactly what you tell it, in order, nothing more. That's why planning the whole route before you press Run is the key skill.
Start by tracing the path with your finger: count how many squares forward, then where you need to turn. A good method is to say it out loud: "forward, forward, turn right, forward".
The trickiest part is left and right. When the robot faces down the screen, its left is your right. Imagine you're the robot, or look at the red triangle on its head, which always points the way it's facing.
When something goes wrong, programmers call it a bug, and fixing it is called debugging. Watch the white outline move along your program as it runs: the block it was on when things went wrong is usually where the bug is.
Read more: Sequences, bugs and debugging: coding ideas in Robot Code.
Guide written by Noam for Noam's Game Hub.