How does the tutorial work?
You do every step yourself, in the real Factory and Brain code, so everything you make is yours to keep and change afterwards.
What you'll do
- Make an account, or log in. Your machines and bots are kept under your account. If you're already logged in, this step is skipped.
- Build the machine. In the Factory, you click Clear to start from nothing, then bolt on a scanner (SCN-1), which tells you which way things are; a laser (WPN-1); and a rangefinder (RNG-1), which tells you how far. The light tracked chassis, CHS-L, is the body. You see how each part gets a numbered channel, which is how your program talks to it.
- Save it as a design. You name it (hunter, say) and click Save design.
- Make two bots. You click Code the brain →, then build two bots from your design: hunter-1 and target.
- Write the target's program. A three-line Python program that does nothing but wait.
- Write the hunter's program, in five small stages: connect to the parts, look and lock on, decide whether it's near or far, steer toward it, then close in, stop and fire. New lines are marked at each stage, and each one is explained.
- Test it. In the Test arena, you place both bots on the field about 10 m apart, turn the hunter to face the target, and click Run test. The match plays in the Arena, and the Bot logs under the field show what each bot's program reports.
Getting around the panel
- Next → and ← Back move between steps. Many steps move on by themselves once you've done what they ask, after a moment to show a ✓.
- Where there's code to type, Copy the whole program copies it, so you can paste it into the editor.
- ▾ folds the panel out of the way; ▴ opens it again.
- ✕ leaves the tutorial.
- If you reload the page partway through, the tutorial carries on from the step you were on.
- Clicking Tutorial in the menu bar starts it again from the beginning.
When you're done
The last step suggests things to try next: make the hunter sweep faster or stop further off, add a second target, put a block between them in the Test arena, or try another language. The Reference under the editor lists everything each part can do.