Robot Game
Controls
- Tap or click a palette block to add it after the selected block (or inside a selected Repeat / If)
- Drag the :: handle to reorder blocks, or use Up / Down / Delete
- Run, Step, Reset and Speed buttons control the robot; P or Esc pauses a run
- Keyboard: F L R J U D T I C add blocks, 2-9 set a repeat count, arrows select, G runs, S steps
Robot Game is a coding puzzle you can play free in your browser. Instead of steering the robot directly, you write a short program out of command blocks, press Run, and watch the little robot carry it out one block at a time. Collect every battery, plug batteries into power sockets, and finish on the glowing goal pad. It suits kids meeting programming for the first time and adults who like squeezing a solution into as few blocks as possible. No download or sign-up needed, on desktop or phone.
How to play
Each level is a small grid of tiles at different heights. The robot faces the way its white arrow points. Build your program in the Main list, then press Run.
- Forward moves one tile ahead, but only onto a tile of the same height.
- Left and Right turn the robot on the spot.
- Jump moves one tile ahead while climbing exactly one step up, or dropping down any number of steps.
- Pick up grabs a battery from the tile the robot is standing on. Place plugs a carried battery into a socket on the current tile. Both do nothing on a tile without a battery or socket.
- Repeat runs the blocks inside it 2 to 9 times. Tap its number to change the count.
- If blocked runs the blocks inside it only when the robot cannot step forward, because of a gap or a change in height.
- Call function runs everything in the Function list, then carries on. A function can even call itself.
The goal pad lights up once every battery is collected and every socket is filled. The robot wins the moment it stands on the open goal, even if blocks are left in the program. If it walks into a gap or tries to step onto the wrong height, the run stops with a bump and you can edit and try again.
Building and editing programs
Tap or click a block in the palette to add it. New blocks go right after the selected block, or inside it if the selected block is a Repeat or If blocked. Tap the Main or Function title to add to the end of that list instead. Drag a block by its handle to move it anywhere, including into or out of a Repeat, or use the Up, Down and Delete buttons. Every block can also be added from the keyboard.
Run plays the whole program at the chosen speed (1x, 2x or 4x) and highlights the block being carried out. Step moves one block at a time, which is the easiest way to find where a program goes wrong.
Levels, stars and the sandbox
There are 30 levels in five groups. Levels 1 to 6 are plain sequences, 7 to 14 introduce Repeat and loops inside loops, 15 to 21 introduce the Function list, 22 to 28 add If blocked, and the last two mix everything. Every level has a par: the block count of a short known solution. Matching or beating par earns 3 stars, up to two blocks over par earns 2, and any win earns 1. Finishing a level unlocks the next, and your stars and the program you wrote for each level are saved in your browser.
The Sandbox is a free-build grid. Add or remove tiles, raise or lower them, place batteries, sockets and the goal, move or turn the robot, then program your own route.
Tips
- Say the route out loud first. Writing the moves as a plain list, then spotting the part that repeats, is how most levels shrink to par.
- Use Step when you are stuck. Watching the red highlight move block by block shows the exact turn that went wrong.
- Harmless blocks are useful. Pick up and Place do nothing on an empty tile, so they can sit inside a loop that walks over batteries and sockets.
- If blocked is a corner detector. Inside a Repeat, “if blocked, turn right, then forward” follows a corridor that only bends right.
FAQ
Is Robot Game free?
Yes. No account or install, and progress is stored in your browser.
Is it good for kids learning to code?
Yes. The levels introduce one idea at a time: sequences, loops, functions and conditionals, the same building blocks used in real programming languages.
Does it work on a phone or tablet?
Yes. Tap blocks to add them and drag the handle to reorder; the page won’t scroll while you drag.
What happens if my program never ends?
The loop guard stops it after 5,000 blocks or 400 moves without a win and tells you why, so the game never freezes.
Are there other puzzle games like this?
If you like planning moves ahead, try Sokoban, or work through a path puzzle in our Maze.





