Player following
The ordinary 14.9.1 /follow command sends FollowTargetIIR_c, key 0x260f3671.
It does not send the CharacterAction 29 constructed by the separately exported
N3Msg_Follow method. The server now admits the ordinary request and advances
transient authoritative follow motion using the recovered arrival controller.
The client supplies occasional action20 pose corrections while moving; server
motion must advance between them. See player movement.
Open-ground
positive-direction movement is implemented; native scene collision, complete terrain/flight behavior
and the full combined lifecycle matrix remain unfinished.
Server implementation
server/player_follow.go validates the owned actor, captured scalar/control,
zero correction and empty path. It admits living connected players and known
living NPCs in the same playfield. A self-target is harmlessly stationary under
the same controller. Dead, unavailable and different-zone targets are rejected;
these eligibility policies are explicit implementation choices, not recovered
historical server rules.
Follow state lives with the actor in memory and is cleared on manual non20
movement, target loss, death/loading and session replacement/disconnection.
Mouse20 reanchors the pose while retaining the controller. Target changes retain
velocity. Manual turn and walk/run events retain an actively moving follower's
forward throttle before applying the ordinary input transition; arrived followers
retain zero throttle. Source cases L06-L07 establish that these events clear the
target without halting linear movement. Target loss sends CharDCMove stops 2 and 4: clearing the native target
alone leaves its automatic throttle active. The matching direction event clears
throttle and halts without changing preferred walk/run mode; the other is ignored.
Complete receiver/listener/state-machine bodies are recorded in
docs/research-notes/player-follow-research/mass/cache/target-loss.md (L01-L05).
A 60 Hz simulation snapshots every target before moving any follower,
so chains/cycles do not recurse or depend on Go map iteration. This tick rate is
a server scheduling choice verified against native movement, not a recovered
historical server frequency.
Position consumers read the updated pose directly. Movement interrupts casts, checks trade/bank availability and participates in ordinary zone triggers. Cast admission also checks actual follow velocity: a moving follower cannot reserve nano, while an arrived follower can cast normally. Height-map projection subtracts heights before adding the delta to avoid floating-point noise moving a stationary actor and incorrectly interrupting its cast. The existing periodic checkpoint saves pose; follow ticks perform no routine database writes. Significant cast refunds retain their immediate transaction. Late observers receive the current velocity in the actor snapshot, then a CurrentMass update and FollowTarget immediately after both actors have spawned. It does not wait for the observer's own readiness while a moving actor has already started simulating. Readiness repeats the controller with its current pose correction to cover time spent loading. Initial and ready replay restore held forward/backward input and predicted poses for ordinary moving players before their followers. Otherwise a joining client would follow an old, stationary copy of the target. NPC interest entry also replays affected targets.
Body mass comes from KKR SimpleChar initialization 3606dd00's breed/sex table, scaled by float32(0.001): Solitus 80/70, Opifex 75/65, Nanomage 75/60, Atrox 100. Movement refresh 36047e60 uses 10 only for an otherwise zero mass. Carried mass uses generic item stat 2, quantity and normalized stat 212 over ordinary inventory slots; equipped/bank items are excluded. A live Chest supplies VolumeMass 71, initialized to zero by its constructor. Later contents propagation remains an explicit research boundary; the server currently uses zero for Chests. Body mass is the force integration denominator; total mass sets its force cap. The server publishes CurrentMass 78 to observers, which have no copy of the owner's inventory, and refreshes it when an active player's carried mass changes. That update is followed by the unchanged raw RunSpeed 156: CurrentMass alone does not rebuild the native vehicle cache. Stat dispatch 3606e4fe refreshes through 360480e0 and 36047e60 before storing RunSpeed. The unchanged raw value avoids reading an uncommitted replacement or counting equipment/nano modifiers twice.
Native physical start invokes PlayerVehicle 360481a0 and the signed movement event:1 for retained positive direction,3 for negative. Arrival Halt invokes 3604bc80/360481d0 and matching stop2 or4, restoring helper1/0 and zero throttle. Reverse stop also restores positive direction. Before the first moving outer Run, the running parameter cache therefore uses the reverse formula; subsequent movement uses the forward formula. The server preserves that first-step distinction. A moving snapshot supplies both helper bytes and its forward control, in addition to velocity.
The recovered PlayerVehicle reader/writer requires 42 bytes: velocity 12,
ten helper bytes, preferred mode 4 and four control floats 16. Empty NPCVehicle
uses 28 bytes because its tail is a short waypoint count. The old shared
28-byte player buffer caused tolerant native read failure, zero controls and
stream status 3. Player snapshots now supply the complete buffer. Source bodies,
writer/reader pairs and cache callback hashes are retained under
local/player-follow-research/mass/cache/.
Maintained encumbrance flag 36306612 starts zero in its guest mapping, with no
direct setter recovered. The implementation does not invent an enabled overload
penalty. Complete mass bodies, source hashes and initialization evidence are in
local/player-follow-research/mass/. A read-only hardware measurement independently
matches the native body masses 0.08000000566 and 0.07000000030 for the two visitors.
The ground-height policy currently matches NPC roaming's archived height map. It does not implement native QQR scene geometry/surface collision. The full Follow TODO remains open for that boundary, slopes, gravity/flight, platform behavior and combined lifecycle/resource cases. The shared player simulation advances held longitudinal, strafe and turn controls without the former 20-second prediction horizon. Following a moving player therefore uses its current authoritative pose between sparse native action20 corrections. Reverse-to-follow retains negative direction and body heading until arrival, with a regression for the matching stop4. Late reverse observers require native direction initialization before follow; the accepted transition briefly restarts acceleration, as documented there.
Authoritative-controller verification
The evidence and verification script are in local/player-follow-authority/.
All GUI actions use the ordinary WASM client on the GPU. Native probes only
read state; fixture changes use the public control editor. The successful final
walking route lasts 19 seconds. This evidence predates the shared player
simulation; longer-held and stale-observer failures are retained
as diagnostics and do not count as successful canonical movement.
- Owner arrival differs from the authoritative server pose by 0.038 units. A cold observer arrives within 0.036 units; its moving replay is within 0.122. The remaining vertical difference is the native scene surface versus the server's quantized height map. Weighted inventory refresh also matches native mass/force parameters, including CurrentMass followed by the RunSpeed refresh.
- Initial and ready replay both restore the target's held forward input before the follower controller. Read-only native velocity/control probes verify that the late target moves rather than remaining at its old anchor.
- The 25.5-second owner sample has one action20 pose message near its start and no subsequent movement snapshots. Server position therefore must advance independently. Mouse rotation retains following; a normal movement key clears it.
- A running follower stops when its target changes playfields. Native follow pointer, throttle and velocity all clear; 20 subsequent samples over two seconds keep exactly the same position. The two stop packets are verified on the wire.
- Native Backspace and left-turn cancellation retain forward throttle, clear the target and keep the public map estimate advancing with the client. A subsequent W press/release clears throttle and velocity. Moving and arrived automated cases separately cover forward/backward starts/stops and turn/walk/run events.
- Automated cases cover untrusted/malformed requests, visibility/session gates, acceleration, arrival/crossing, mass, cycles, retargeting, manual cancellation, roots, late replay, casting admission/refunds, simultaneous trade movement and periodic checkpoints without tick writes. A real stationary-terrain regression first reproduced the rounding-induced false cast interruption, then passed.
- Focused tests, race checks, vet and the complete suite are recorded separately with source hashes in the evidence directory. An intermediate broad run exposed old appearance assertions after the corrected 42-byte player vehicle; those offsets were corrected before the final complete run.
The final complete run covers every one of the 1,196 top-level server tests
exactly once across four batches, plus gamedata and the exporter package:
13,981 test/subtest results pass. Source hashes match the final tree. The final
focused race run has 109 passing results; vet passes. Results are indexed in
verification.json and exact-suite-manifest.json in the evidence directory.
Browser page-error logs are empty. All nine owned player fixtures and their owned item were removed after closing their browsers; unrelated database rows were hashed unchanged and foreign-key/integrity checks passed. The sole LAN preview remains on HTTPS8443 with the tested controller.
Request and receiver contract
The shipped cd_image/text/TipOfTheDay.txt documents selecting another
character and typing /follow. Maintained KKR sub_36053BE0 compares the
command at 0x36055ae1, resolves the selected target, checks the follower's vehicle
state, and constructs FollowTarget through sub_3607E2C0. It supplies the owned
actor, selected target, float 2.5, control 0, zero position and no waypoints. The
packet is passed through llr!n3Dynel_t::SendIIRToObservers. The optimistic green
"Following
The captured request is 58 bytes before alignment padding. After the native 13-byte IIR prefix, its subclass is 29 bytes. The Go dispatcher expands the prefix to 16 bytes, producing this 45-byte handler body:
| Handler offset | Type | Captured field |
|---|---|---|
| 0 | uint32 | Key 0x260f3671 |
| 4/8 | two uint32 | Owned actor identity, type 50000 and character ID |
| 12 | uint32 | Pass-on 1 |
| 16/20 | two uint32 | Selected actor identity, type 50000 and character ID |
| 24 | float32 | 2.5, bits 0x40200000 |
| 28 | byte | Control 0 |
| 29/33/37 | three float32 | Zero position correction |
| 41 | int32 | Zero waypoint count |
All wire numbers are big endian. Padding is outside the message length and must not be interpreted as another field. The general class also supports position corrections and up to 30 waypoints; the captured player request does not authorize a client to supply arbitrary corrections or NPC routes.
Registration 0x36016450 binds the class string to factory 0x360163d0, which allocates 0x1a8 bytes and calls 0x3607e220. Its vtable 0x36171720 binds reader 0x3607e540, writer 0x3607e490 and activation 0x3607e690. The activation resolves the subject, optionally corrects position, dispatches the control byte, then installs the target through 0x36048260. The control 0 transition leaves the current movement state unchanged; it does not need a guessed walk/run event to start following. The installer stores a target pointer at vehicle+0x160. Its float argument is not read in the complete maintained body: 2.5 must not be assumed to set the native player's stopping distance.
PlayerVehicle vtable 0x36170fe8, bound by source RTTI to PlayerVehicle_t, has steering 0x3604ba20 at slot+0x4c. SCFU's factory selects NPCVehicle only for its NPC flag mask 0x1; ordinary remote players also receive PlayerVehicle. Both owner and observer therefore consume the same follow target. NPCVehicle's 0x3604af50 is a different steering consumer; the older retained evidence index incorrectly labels both consumers NPC-only.
Admitted ordinary movement activation 0x360439e0 clears following for every action except 20. Extended activation 0x36047350 follows the same rule. Rotation action 20 preserves it. Target installation/removal is shared through 0x36048260; an accepted manual movement action can cancel following without a separate target-clear packet. Destructor 0x36047964 also clears the target.
SCFU reader 0x36082da0 accepts an embedded follow identity and waypoint count/list under flag 0x00010000, after active-nano restoration. Activation 0x360821d0 installs that target at 0x360828c6. Go instead queues the separate FollowTarget after all actor snapshots, establishing both identities before replaying the controller. The exact historical server correction cadence and every reference-deletion callback remain unestablished.
Movement arithmetic and authority
PlayerVehicle calls shared steering 0x36048430 with a true argument. It checks movement permission 4 and calculates the full 3D target delta. At squared distance <= 16 it returns the current position. Otherwise it returns a point four world units short of the target. NPCVehicle calls the same helper with false and takes the waypoint/terrain path instead.
This target point is input to QQR Vehicle::SteeringDirArrive, not an instruction
to move at constant speed. Maintained 0x42015fe0 checks the horizontal arrival
crossing and calls 0x42015e90 with tolerance 0.2. The latter derives desired speed
from distance and braking distance, capped by maximum velocity, then derives a
damped force from the desired and current velocities. The integrator clamps
force and velocity and advances position using the updated velocity. Body mass,
total mass, maximum force, braking distance and timestep behavior matter.
Discarding them would produce another movement implementation with different
arrival behavior. Exact source equations, constants and remaining geometry,
encumbrance and integration boundaries are retained in
local/player-follow-research/physics/.
For the ordinary unobstructed level-ground branch, with arrival point g,
position p, velocity v and maximum speed V, the recovered equations are:
desiredVelocity = normalize(g-p) * min(V, 4*length(g-p))
maxForce = min(10000, 2*totalMass*V)
force = clampLength(4*bodyMass*(desiredVelocity-v), maxForce)
v = clampLength(v + force*h/bodyMass, V)
p += v*h
Braking distance is V/4, computed before the force cap. Total mass includes
carried mass; the integration denominator uses body mass. Arrival halts inside
a strict 0.2 radius or after crossing the arrival point horizontally. Previous
position changes once per outer Run, while force is recomputed per substep.
The default maximum substep is 0.4 seconds; nonpositive or greater-than-four
second intervals do not advance the integrator. A chosen Go tick rate must
be verified against actual native motion, including the full gravity, surface
and collision branches. The encumbrance multiplier depends on a global flag;
its maintained mapping starts zero, while the original live effective value
and indirect setters remain unestablished.
The arrival controller itself does not publish movement messages. A separate engine CheckMotionUpdate path checks every 61st engine Run, uses a strict greater-than-20-second integer-time threshold and a vehicle-speed gate, and submits ordinary CharDCMove action20 without excluding followers. The short hardware captures below establish only their own observed message windows. Complete producer/caller/timestamp-reset evidence and the longer capture are indexed in player movement.
The server uses transient follow state and authoritative motion, shared with its position consumers and periodic checkpoints. It retains rotation 20, cancels on other admitted movement, stops or suspends for disappearing targets and movement restrictions, interrupts affected casts/trades/bank access, and handles target chains without recursive cycles or iteration-order dependence. Scene geometry and height/flight behavior require explicit validation. Durable resource changes still commit immediately; routine follow positions do not require per-tick database writes.
Hardware and connection evidence
Two owned GPU Chromium/WASM clients used ordinary target clicks and chat input on the single HTTPS 8443 preview. No native calls or guest-memory writes were used. The saved runs distinguish these observations:
- On the unchanged server,
/followsends exactly the contract above, produces optimistic text, and receives no FollowTarget response. Selecting the target separately sends CharacterAction 105 for information; that is not Follow29. - A temporary response bridge validates the captured shape and echoes it to owner and observer. A real world-connection regression first reproduces the missing response, then verifies the two addressed deliveries and a subsequent ping. One initial response assertion compared alignment padding to a trimmed reader result; it is excluded and the corrected assertion passes.
- With that bridge, the follower and its observer visibly follow a leader walking for four seconds. The follower sends no CharDCMove or CharMouseMove during automatic movement. Both browser page-error logs remain empty.
- The public control page still reports follower 105 at
[960.625,16.5,510.625]after it has followed the leader. A normal W press cancels following and reports[951.125,16.375,503.125], a 12.1-unit change that includes the manual key tap. Thus the bridge demonstrates the native protocol but leaves server position, range checks and checkpoints stale. It is retained as an experiment and is not part of the current server. - The early baseline's short W taps ended with the leader within the native stopping distance. Those screenshots are not a physical follow-failure test; the missing response and the later long-walk experiment are separate evidence.
The bridge source, binary and corrected regression are retained under
local/player-follow-research/first-response-prototype/ and the research root.
The runtime directories retain the historical label fixed for that response
experiment; it does not mean authoritative following is complete. Both owned
players 104/105 were removed after closing their browsers, with all unrelated
database rows preserved. The sole preview was restored to the verified camping
build 218853d. No production FollowTarget handler was enabled by this research.
Sources and remaining checks
Target original KKR SHA256:
a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0.
Original KKR addresses use base 0x10000000; maintained addresses above use
0x36000000. Maintained QQR uses 0x42000000. The evidence consists of maintained
instruction lifts/data initializers and already-retained original records;
no new original-binary analysis session or export was used.
local/player-follow-research/request/ preserves complete command/sender/
constructor/SCFU reader bodies and source hashes. receiver/findings.md and
receiver/movement-followup.md link complete bodies, registration, IAT, vtable,
RTTI and caller inventories. The matching original records include:
- Activation:
ev_8bcc339823b969bc5b5e36d6a434f625a11eee1b065ef8dcc4dfa51a8fc5cea5. - Steering:
ev_437e76236c9b5d2a0d7dd122ca12b1ff620178cda1d2209666b42e29d1f39ab9. - Consumers:
ev_1e75e2365d7f68786685da35877287cd6dc6aba5c507b06902338a1067098cc1.
Raw frames, screenshots, GPU descriptions and public control snapshots are in
local/player-follow-smoke/. The research verification ledger is
local/player-follow-research/milestone-verification.json.
Completion requires owner/observer/server positions during movement and after arrival, late observation, manual cancellation versus mouse rotation, target changes and chains, roots/snares, terrain/flight, death/despawn/zoning/disconnect, reconnect/cold checkpoints and zero routine database churn. Self/dead/unknown/ different-zone targets, malformed corrections/waypoints and the distinct CharacterAction 29 sender need explicit evidence-based policies. The request shape alone does not establish the historical server's eligibility rules.