luft/render/game.lisp
Return source's packed solid chain for sparse queries.
Read solid for gameplay, treating its finite horizontal boundary as wall.
Meshing and other world clients retain explicit outside-domain semantics.
Only physical occupants choose this restart, so walkers slide along the box
and projectile terrain publication materializes nearby boundary colliders.
One inspectable discrete intention realized by the continuous player.
START, DESTINATION, and CELLS are packed luft cell sites at the character's
foot height. The route owns no duplicate terrain field; collision remains
authoritative while the player crosses between its cell-centre waypoints.
INITARG sharing above names the semantic initial value. Temporal state must own a distinct vector before either side is mutated.
Make the sanctuary player at the bridge's authored starting point.
Retain player's exact pre-step pose for temporal rendering.
Whether the point-footprint player fits above base-z at X,Y.
Return a nearby supported base height for a step to X,Y, or NIL.
The controller can climb one cubical step and descend two. It does not scan for a remote roof, so a wall cannot teleport the player onto its top.
Whether the player can stand at the centre of the exact foot cell X,Y,Z.
Call function with each nearby eight-connected neighbor and step cost.
Return a bounded, eight-connected octile route from player to destination.
destination is a packed luft foot cell. A returned failed route retains the
reason and search count, so a click that cannot be honored is inspectable
rather than silently becoming a straight-line collision attempt.
Replace player's current intention with a route to foot cell X,Y,Z.
Return movement authority to direct input, retaining the cancelled route.
Return camera-relative axes and remaining distance for player's route.
Sweep player along one horizontal axis, sliding at blocked boundaries.
Validate the whole axis attempt before publishing it. Axis separation therefore retains its atomic slide-at-a-wall behavior while every cell crossed by a long attempt still participates in collision.
Sweep one airborne horizontal axis while retaining solid wall collision.
Request one grounded jump on player's next simulation step.
Ignite the staff orb; the renderer consumes this short cast envelope.
Throw (or replace) player's ball from origin along direction.
Publish nearby luft cells to the Luvcraft solver as static boxes.
Apply Luvcraft-strength gravity to luft's Z-up walking controller.
Advance player from camera-relative movement axes for seconds.
The shader's authored half-step is 0.75 cells. Advancing gait from actual travelled distance keeps planted feet in world space even when collision shortens a requested move.
A released key owes the character a planted-foot pose rather than leaving one boot suspended forever at an arbitrary sampled phase.
Move current calmly toward target, catching up harder as separation grows.
quiet-radius is a soft camera zone: motion inside it is treated as local
character movement rather than a reason to reframe. Outside it, an exact
exponential response makes the result independent of frame rate, while its
rate rises with distance so large discontinuities do not leave the player
behind.
Follow player through a quiet zone with distance-sensitive catch-up.
Showing more of where the traveler is going makes movement legible.
Terrain relief is much less important than lateral travel: let a whole stair tread pass without bobbing the frame.
Return current, previous, and heading vec4 lanes for the GPU boundary.
Farthest horizontal cell distance admitted by one click-to-walk route.
Farthest vertical cell distance admitted by one click-to-walk route.
Maximum standable cells considered by one click-to-walk search.
Horizontal distance from a cell centre which completes one waypoint.
One authored solid and its vocabulary-closed material-placement field. The solid remains LUFT's topological truth. The sparse authored field stores only dense vocabulary offsets; semantic material objects remain at the scene boundary rather than being allocated per cell.
(solid x y z)Read SOLID for gameplay, treating its finite horizontal boundary as wall. Meshing and other world clients retain explicit OUTSIDE-DOMAIN semantics. Only physical occupants choose this restart, so walkers slide along the box and projectile terrain publication materializes nearby boundary colliders.
A cell probe left its box. The signaling probe offers the boundary restarts TREAT-AS-AIR, TREAT-AS-SOLID, and USE-VALUE, so the caller's handler decides what lies past the edge: a world treats it as air, a chunk store answers from the neighboring chunk or defers, a test refuses.
(chain x y z)Treat positive cubic-site occurrences in CHAIN as Boolean occupancy. Cells above and below the Z range are air; probes beyond the horizontal box signal OUTSIDE-DOMAIN with the boundary restarts.
The continuous, player-owned state of LUFT's walking character. POSITION is the centre of the character's feet. Heading and gait are semantic animation inputs; keys and shader clocks are deliberately absent.
(&key terrain (kernels :fastest))One inspectable discrete intention realized by the continuous player. START, DESTINATION, and CELLS are packed LUFT cell sites at the character's foot height. The route owns no duplicate terrain field; collision remains authoritative while the player crosses between its cell-centre waypoints.
((agent application-agent) &key)(x y z)(&key
(position
(vec3:make-vec3 (+ +sanctuary-origin-x+ 29.5)
(+ +sanctuary-origin-y+ 24.5) 14.0))
(heading-x 0.0) (heading-y 1.0) (speed +walking-player-speed+))Addition over compatible quantities.
(player)(solid x y base-z)(source x y current-base-z)Return a nearby supported base height for a step to X,Y, or NIL. The controller can climb one cubical step and descend two. It does not scan for a remote roof, so a wall cannot teleport the player onto its top.
Subtraction or unary negation.
Test whether two compatible scalars are equal.
Logical conjunction of tests and raw truth values.
(source x y z)(cell start)Test whether one compatible scalar is at most another.
The maximum of compatible quantities.
The componentwise absolute value of a raw value.
(site)(site)(site)(function source cell start)(chain)Logical disjunction of tests and raw truth values.
(domain x y z &optional (extent +vertex-extent+) (polarity 1))Pack a canonical site inside DOMAIN's box. No coordinate wraps: anchors range over [0, limit] per horizontal axis, and a site extending along an axis cannot begin on that axis's far boundary.
The componentwise square root of a raw value.
(from to)Multiplication and scalar scaling.
The minimum of compatible quantities.
(frontier priority cost cell)Test whether one compatible scalar is less than another.
(frontier)(parents start destination)(player source destination)Return a bounded, eight-connected octile route from PLAYER to DESTINATION. DESTINATION is a packed LUFT foot cell. A returned failed route retains the reason and search count, so a click that cannot be honored is inspectable rather than silently becoming a straight-line collision attempt.
(player source x y z)(player &optional (detail "manual movement"))(player cell)(player)(player camera)Division of two represented quantities.
(player source axis amount)Compare compatible quantities and produce dimensionless values.
(player source axis amount)(player)(player origin direction)(origin &rest direction-scales)(world handle)(world handle)(world x y z &key (radius 0.25) (mass 1.0) (vx 0.0) (vy 0.0) (vz 0.0)
(restitution 0.3) (friction 0.5) (rolling-resistance 0.01)
(damping 0.05) (kind 0)
(collides-with-bodies-p t) (hit-report-p nil)
(never-sleep-p nil) (lifetime nil))(player source)(world)(world min-x min-y min-z max-x max-y max-z
&key (vx 0.0) (vy 0.0) (vz 0.0) owner)(player)(world handle)(player source seconds)Test whether one compatible scalar is at least another.
(world &optional dt)Advance WORLD by DT seconds (its step by default) and return it. Events from the step are then readable until the next step begins. #IDVK7G
(player source seconds)(player source camera forward right seconds &key maximum-distance)(current target seconds quiet-radius)Move CURRENT calmly toward TARGET, catching up harder as separation grows. QUIET-RADIUS is a soft camera zone: motion inside it is treated as local character movement rather than a reason to reframe. Outside it, an exact exponential response makes the result independent of frame rate, while its rate rises with…
(camera player &key (distance 18.0) seconds)(camera)
The small semantic game layer over
luft's packed terrain.A player is an inspectable object at the application boundary. Terrain queries stay direct packed-chain reads, and rendering consumes two dense vec4 lanes made from this state once per frame.