luvcraft/locomotion.lisp
One bounded, waitable request for a continuous body to reach a cell.
Whether body can stand centred in cell X,Y,Z on resident solid support.
Standable horizontal neighbors of cell, allowing one-cell steps up/down.
Find a bounded four-connected path of standable cells to destination.
The returned path excludes start and includes destination. NIL also denotes
the already-there path; the second value distinguishes that from failure.
Publish action's terminal status exactly once and wake its waiting caller.
Cancel body's current Move To action, if any.
Start body moving to integer cell X,Y,Z and return its waitable action.
Block the calling worker until action reaches a terminal state.
The canvas thread must never call this; it advances action a little each
frame. A provider/tool thread may wait here without stalling rendering.
Advance body's current discrete destination through continuous physics.
Farthest horizontal cell distance accepted by one Move To action.
Farthest vertical cell distance accepted by one Move To action.
Maximum cells considered by one nearby path search.
Time without useful progress before a Move To action replans.
Horizontal distance from a cell centre which counts as arriving.
One bounded, waitable request for a continuous body to reach a cell.
(body)(body)Addition over compatible quantities.
(body)(body)(body)(body world x y z)(world x y z)Return one site as BLOCK and :RESIDENT, or NIL and :ABSENT. This sparse world-coordinate accessor constructs coordinate descriptors and a chunk lookup key. It is appropriate for inspectors, ray hits, collision probes, and sparse interaction. Algorithms over many cells should select a chunk/domain once and use…
Logical conjunction of tests and raw truth values.
(block)(body world x y z)(cell start)Test whether one compatible scalar is at most another.
The componentwise absolute value of a raw value.
Subtraction or unary negation.
(body world cell start)Test whether two compatible scalars are equal.
(parents start destination)(body world destination &key (start (body-cell-list body)))Find a bounded four-connected path of standable cells to DESTINATION. The returned path excludes START and includes DESTINATION. NIL also denotes the already-there path; the second value distinguishes that from failure.
Logical disjunction of tests and raw truth values.
Test whether one compatible scalar is less than another.
One named verb over a session.
(action status &optional detail)(body &optional (detail "superseded"))(body world x y z)The maximum of compatible quantities.
Multiplication and scalar scaling.
Logical negation of one test or raw truth value.
(action)Block the calling worker until ACTION reaches a terminal state. The canvas thread must never call this; it advances ACTION a little each frame. A provider/tool thread may wait here without stalling rendering.
(body waypoint)The componentwise square root of a raw value.
Raise a dimensionless value to a dimensionless power.
(body waypoint)(action world)(body world seconds)Test whether one compatible scalar is greater than another.
(body world target-x target-z seconds &key jump-p)Advance BODY by one collision-checked walking step toward horizontal velocity. TARGET-X and TARGET-Z are velocities, not coordinates. This is the common physical motor beneath held player input and discrete Move To actions: the caller decides where to go; the body accelerates, collides, steps, and falls.
The minimum of compatible quantities.
Division of two represented quantities.
Destinational movement for any body in the block world.
A Move To request is intentionally discrete: an integer place, a short path of standable cells, and a terminal result. Its realization is not. The body keeps an ordinary continuous position and velocity and reaches each waypoint through the same acceleration, gravity, step-up, and voxel collision motor as held player input. This is the two-authority model in #YPGXKI: a compact intention above an honest physical body.