Score 0
The mission models work as shown in the official Robot Game Missions Video. Orange pads are the parts the robot pushes: most stay where they are pushed (they turn teal once they are all the way in), so the Plant Root can be partly or completely extended, and the Rock springs back so you can flip it and then put it back. M01: the drone stands on four rigid legs; push or hook the red cable anchor in towards the pilot and the legs fold up and lift the drone (the whole rig swings round on the pilot’s turntable), then push the anchor on into the LiDAR’s handle to flip the map. M02: knock the three hanging seeds off the stalk; they land on the mat, and so does the seed knocked off the M09 tree, ready to carry to the Replantation Station (M14). Hook pieces off their models with the middle of the basket: the leaves in the nest (leave the katydid, its spot is random each match), the vine on the M08 tree (pull it down onto the mat) and the M12 support tie (drop it over the post; it is on a chain). M13: drop the keystone onto the restoration platform and the young trees rise. Push the ant in slowly, or leaf fragments fall out of its nest. Missions with the No Equipment Constraint (M01, M04, M05, M07, M09, M10, M12, M15) score nothing while the robot is touching their model, so back away when you are done.
Live robot
The robot close up, front at the top, on a white floor whose grid slides underneath as it drives (drag to look around). It keeps its own colours unless a part is doing something:
spinningflashing red: slipping or a problem (Test failures)
Arrows by each wheel: how fast the wheel turnshow fast the ground goes by(when they differ, the tyre is slipping).
Real robot not connected
Connect your SPIKE Prime hub over Bluetooth to see its live readings and a see-through purple ghost of it on the field, worked out from its wheels and gyro. Run on both runs your program in the simulator, sends the same motor commands to the real robot, then starts both robots together so you can see where they differ. Only one app can connect to the hub at a time, so close the SPIKE App's connection first.
Show as a table
Connection log
Build your robot
Robot specs
Ports
Test failures
Switch parts off or make them work badly to see how well your program copes. Changes take effect straight away, even while a program runs, and stay until you repair them.
Launch
Field setup
Help
How to code the robot
Blocks work like the SPIKE App's word blocks. The hub is wired like a SPIKE Prime driving base:
A left drive motor B right drive motor (movement motors A+B) C basket motor: run ↻ 90 degrees to close it on loose models, ↺ to open D spare motor (nothing attached) E color sensor (looking down) F distance sensor (facing forward)
As on a real hub, move blocks only count motor degrees: they don't use the gyro, and there is no "turn 90°" block. Turn with move ↻ for … degrees (motor degrees: about 180 for a 90° robot turn) or with the yaw angle, like the turn right / turn left My Blocks in the example. Yaw counts up when the robot turns right and wraps at ±180. Distances use set 1 motor rotation to 17.5 cm. Programs with event hats (when color, when I receive…) keep running until stop all or time runs out.
Real robot: on the Code tab, Save for SPIKE App saves your blocks as a .llsp3 project that the LEGO Education SPIKE App opens, and Open file reads a .llsp3 project made in the SPIKE App. If that program's robot is wired differently, its ports are moved to match the simulator robot's (and put back when you save it for the SPIKE App again; see Setup). Pick your robot and its wiring on the Robot tab: the SPIKE Prime Advanced Driving Base drives on A+E with color sensors on B and F, so its programs run unchanged.
JavaScript (simulator API, with gyro-assisted drive and turns): use await on every action that takes time.
await robot.drive(cm, speed=50) // negative cm = reverse await robot.turn(deg, speed=40) // + = clockwise (right) await robot.turnTo(heading) // 0 = north, 90 = east await robot.wait(seconds) robot.setMotors(left, right) // -100..100, keeps running robot.stop() await robot.grab() // scoop loose models in front await robot.release() robot.color() // black white red yellow green blue azure violet magenta robot.reflection() // 0-100 (color(2) / reflection(2): the second color sensor) robot.distance() // cm to nearest object ahead robot.heading() robot.x() robot.y() robot.time() robot.holding() robot.log(...)
Robot: SPIKE-style base, 0.95 kg, 56 mm wheels 11.2 cm apart, top speed about 49 cm/s (speed 100).
drive measures distance with the wheel encoders and turn uses the gyro, just like the real hub, so wheel slip
or a bump shows up as an error you have to plan for (tip: re-aim with turnTo after touching something).
The color sensor reads the real BIOGLOW mat artwork. x/y are cm from the top-left inside corner of the table; the mat starts 18.1 cm in from the left wall.
Connecting a real robot
On the Robot tab, Real robot connects to your SPIKE Prime hub over Bluetooth. It needs Chrome or Edge on a computer, and the hub must have the SPIKE App 3 firmware (it does if it works with the current SPIKE App). Close the SPIKE App's connection first: a hub talks to one app at a time.
Once connected you see the hub's battery, gyro and every port, with a warning where they don't match the simulator robot's wiring, and a purple ghost on the field that follows the real robot. The ghost is worked out from the drive motors and the gyro, so like the real robot it can't see its own wheel slip: put it back at the launch spot whenever you put the robot there.
Run on both runs your program in the simulator and records what every motor was told to do. Those commands go to the hub as a small program in slot 19, and when you press Start both the real robot drives them while the simulator runs your program again beside it. Afterwards the charts compare wheel speeds and turning. The real robot doesn't use its sensors during this, so a gyro turn or a line follower behaves as it did in the simulator, even if that is wrong for the real robot. That makes the differences easy to spot: slipping tyres, a heavier robot, weak batteries, a motor fitted the other way round.
To try it without a robot, add ?mockhub to the end of the page's address: a pretend hub (with a slightly smaller right wheel) takes the real one's place.
Optional keyboard driving
When no program is running and the block area isn't focused: arrow keys / WASD to drive, Space to grab or release.