World 6 · Make a game · Guide 2 of 5Free guide
How do I chase something?
One block that always steps closer. Put it in a forever loop, and it never lets go.
Meet the step-toward block
Every arrow you know goes one way: right is always right. The step-toward block has no arrow. It looks at where the other character is right now and takes one step closer — whichever way that is. Put it inside a forever loop, and it looks again on every single step.
No direction on the block. The other character decides where it goes.
See it work
The squirrel runs right. The dog's program never says right — or up. Watch it anyway.
🐿️
The dog went right and up, then right again, every step aimed at where the squirrel was standing at that moment. One block, re-aimed for ever. That is a chase.
Your turn
Now you're the programmer.
Can the cat catch the mouse?
The 🐭 runs round and round for ever. Make the 🐱 catch it.Solve it with 2 blocks → ⭐⭐⭐0 blocks
The mouse's program
Blocks
Your program
Go further
Can arrows catch it?
Try → 1 and ↑ 3 instead. The cat runs up to the corner and stops, and the mouse never comes near it. Now try → 2 and ↑ 3: the cat stops right on the mouse's path, and the mouse runs into it! That is a trap, not a chase — it only works because the mouse always runs the same loop. Step-toward follows the mouse wherever it goes.
For grown-ups
Moving toward a target one step at a time, re-aiming every frame, is the simplest pathfinding behaviour — the 'seek' rule behind most of the enemies in classic arcade games.
Keep going
Next in World 6How do I win? →Where this goes
Make a game other kids can play
The blocks on this page are a first taste. In a Kubrio project your kid builds a real game — powers, triggers, levels and all — and other kids get to play it.
