nx_netpredict.nx
buildroot/runtime/nx_netpredict.nx
about
nx_netpredict.nx -- CLIENT-SIDE PREDICTION + SERVER RECONCILIATION, the warzone-netcode core that hides RTT. The
client applies local input IMMEDIATELY (predicts) so its own creature responds in <100ms regardless of the 150ms
ocean RTT; it tags each input with a sequence number and sends them to the authoritative server. The server returns
its authoritative state stamped with the last input it processed; the client snaps to that and REPLAYS the still-
pending (un-acked) inputs on top (reconciliation). If the prediction was right, reconciled == predicted -> no visible
correction. If the server diverged (an event the client couldn't predict), reconciliation converges the client to the
authoritative truth. Client predict, client replay, and the server all run the SAME deterministic step. Cited model:
Valve/Gambetta/Overwatch. Pure integer. license_tier: ORIGINAL
dependencies 0 imports · 1 importers
imports: none
imported by: nx_netpredict_gate.nx
structs
| none |
consts
| none |
functions
| 11 | func np_step(pos: i64, input: i64) -> i64 { return pos + input } called by 1: np_apply |
| 14 | func np_apply(pos: i64, inputs: *i64, from: i64, to: i64) -> i64 |
| 22 | func np_predict(confirmed_pos: i64, inputs: *i64, total: i64) -> i64 |
| 26 | func np_reconcile(auth_pos: i64, acked: i64, inputs: *i64, total: i64) -> i64 |