Path — waypoints and steering

path decides where a target should go — follow a route of waypoints, glide a spline, or steer toward a moving goal (seek / flee / arrive) — and emits motion to get it there. Where motion plays a fixed, authored path, path computes a dynamic one each tick: patrols, rails, and chasing.

Status: design. Not built yet.


What it is

Following an ordered route

motion plays a path you wrote down; path works out the path as it goes. Three flavours, all emitting motion or a velocity underneath:

  • waypoints — a list of points followed in order, loop or pingpong, with an arrival tolerance (a guard patrol, a conveyor route);
  • spline — a smooth curve through control points (rails, a swooping camera-less flythrough);
  • steering — a goal, not a route: seek a point or a moving target, flee from one, arrive (decelerate into the goal), optionally wander — producing a heading and speed each tick.

path vs motion

motion is data — a fixed sequence, replayed. path is a policy — it reacts to a moving target and the world each tick, so a chaser tracks a fleeing player rather than following a pre-baked line. path sits just above motion: it decides the immediate move and hands it down (a short motion segment, or a direct velocity), so all of motion's transforms and easing still apply.

On the stage

From goal to movement

path runs in Advance: it reads the target and its goal (a point, or another target), computes the next move, and drives motion (or writes a velocity). Steering is a pure function of positions, so a patrol or a chase is deterministic and replays exactly.

Clients

  • Luau — require("path"): follow waypoints or a spline, or set a steering goal.
  • AntBASIC — PATROL sprite%, route$ and SEEK sprite%, target% as the friendly verbs.

Related

  • motion — what it emits · stage — the tick · state — often the thing that switches which path is active
  • luau_path — the Luau API

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.