1 local player input control and reconciliation
forgejo-actions edited this page 2026-07-11 12:38:13 +00:00

Local Player Input, Control, And Reconciliation

Local player control translates input profiles and focus state into frame intents, predicted movement, interaction requests, and reconciliation with authoritative server packets.

Purpose

Use this page when movement input is ignored, UI focus steals gameplay controls, NPC interaction prompts misfire, or predicted movement does not reconcile cleanly with server authority.

Input Domains And Focus

Input profiles define bindings, but runtime input must also honor focus domains. Chat, egui, modal screens, text fields, and gameplay can each capture or suppress actions. A binding is not active just because it exists.

LocalPlayerFrameIntent

Sampling converts input state into a local frame intent: movement, look/facing, interaction, UI commands, and action requests. Downstream systems should consume the intent rather than directly polling keys.

Runtime Adapters

Editor, player preview, standalone, and networked runtime can adapt the same intent differently. Preview may simulate locally. Online gameplay sends movement and action requests through transport and waits for authoritative correction.

Interaction Suppression

NPC and trigger interactions should suppress duplicates while UI or dialogue is already active. Interaction targeting should identify actor, trigger, range, and prompt source so the server can reject stale or impossible actions cleanly.

Movement Queue And Reconciliation

Predicted movement uses sequence ids, queues, acknowledgements, correction packets, and backpressure. If the queue grows, inspect transport health, movement authority rejects, and input sampling cadence.

Debugging

Inspect focus capture first, then sampled frame intent, then transport queue state, then server correction packets. For online issues, compare movement sequence windows and reconciliation logs with movement authority metrics.