Learn-to-code robotics game
Robot Foundry: Learn to Code by Building and Debugging Robots
Robot Foundry is a free, in-browser way to learn programming and robotics by doing. You assemble a robot from parts, write a short program, run it in a simulated arena, watch it fail, read a plain-language explanation of why, and fix it — because debugging is the lesson.
Open Robot FoundryWhat Robot Foundry is
Robot Foundry is a build-program-test-fix loop. You install a chassis, motors, a battery, a controller, and sensors — each with real trade-offs like weight, power draw, and cost — then write a small text program using commands such as move, turn, wait, repeat, and if-conditions. A simulator runs your robot with physics, battery drain, and sensor readings, and a debrief tells you exactly what went wrong and what to try next.
It runs in your browser as a Learning tile on map.ca, with nothing to install. The grammar is small and learnable, so beginners can write real, working programs quickly.
Who it is for
Anyone new to coding or robotics who learns best by doing — students, hobbyists, and classrooms. You do not need any prior programming experience; the game introduces concepts exactly when a mission needs them.
It is especially good for building a debugging mindset: failures are framed as information, and the fix is always to change one thing and run again.
What it teaches across three missions
The three missions escalate the ideas. The first teaches robot anatomy and running commands in sequence — just get to the goal. The second introduces sensors and conditionals: an obstacle shifts position between runs, so only code that checks a bumper sensor and reacts can get around it. The third is about feedback and calibration — following a line by reacting to a sensor and tuning the numbers until the motion is smooth.
Along the way you pick up the core building blocks of programming — sequences, loops, and conditionals — plus robotics fundamentals like the sense-think-act loop and engineering trade-offs between weight, power, and cost.
How to use Robot Foundry
- Open Robot Foundry. Launch the Robot Foundry Learning tile on map.ca — it opens in your browser with nothing to install.
- Read the mission brief. See the goal, the scenario, and your budget, then start the workshop.
- Build your robot. Install parts within budget, watching the weight, power, and cost trade-offs.
- Write and run the program. Add commands from the palette and run it in the arena to watch your robot move, sense, and use battery.
- Read the debrief and fix one thing. When a run ends, read why it succeeded or failed, change a single part or command, and run again until you win.
Frequently asked questions
Is Robot Foundry free, and do I need to know how to code?
It is free and runs in your browser on map.ca, with nothing to install. No prior coding experience is needed — it introduces each concept as a mission calls for it, using a small, readable command language.
How does the build-program-test loop work?
You install robot parts (with trade-offs in weight, power, and cost), write a short program from a command palette, then run it in a simulator. When it fails, a debrief explains the exact reason and suggests a concrete fix to try.
What programming concepts will I learn?
Sequencing commands, loops (repeat), and conditionals (if a sensor detects something), plus a debugging habit of changing one thing at a time — alongside robotics ideas like sensors, the sense-think-act loop, and weight/power/cost trade-offs.
Why does my robot fail the same code on the next run?
In a later mission the obstacle shifts position between runs, so a program that memorises one path will not adapt. Only reactive code — checking a sensor and responding — works reliably, which is exactly the point.