Your place is saved automatically on this browser.
The first animation attempts changed patterns while the robot was already travelling. On hardware this did not communicate the intended physical action clearly enough. The stronger version separates the movement into three visible phases.
Lean while stationary → travel one tile at maximum lean → recover while stationary at the destination.
Animation sequence
For a Right move, for example, the robot uses pattern 4 upright, then 5, 6 and 7 while stationary. It then travels all 16 pixels holding pattern 7. At the destination it reverses through 6, 5 and 4. The same pattern arithmetic works for all four directions because each direction occupies a consecutive block of four patterns.
| Phase | Pattern expression | Position |
|---|---|---|
| Start | pStart | Current tile |
| Lean | pStart+1 → pStart+3 | Stationary |
| Travel | pStart+3 | Moves 16 pixels |
| Recover | pStart+2 → pStart | Stationary at destination |
v0.10 animateMove procedure (movement behaviour introduced in v0.9)
Why SPRITE STOP / SPRITE MOVE INT / SPRITE RUN are used
The routine batches visible sprite-attribute changes around display interrupts. SPRITE STOP prevents automatic updates while the program prepares the next pose or coordinate. SPRITE MOVE INT applies the pending attributes at an interrupt, providing controlled visible steps. SPRITE RUN restores normal sprite processing when the complete tile move is finished.
moveDelay and poseDelay are deliberately separate. moveDelay controls how long each one-pixel travel step is held; poseDelay controls how long each lean or recovery pose is held. Keeping them independent lets the physical travel and character animation be tuned separately on real hardware.
Real-hardware result
This version was accepted as clearly better than the earlier movement cycle. The robot now visibly commits into the move before travelling and settles after arrival, which suits a one-wheeled character much better than a looping walk animation.
