code wiki / _hdl_build / nx_rollback.nx
nx_rollback.nx
buildroot/runtime/_hdl_build/nx_rollback.nx
about
nx_rollback.nx -- N-R4: sovereign ROLLBACK netcode core (P2; the fighting/action-game standard).
Predict remote inputs to advance now; when the REAL input arrives and differs, restore the last
CONFIRMED snapshot and RE-SIMULATE forward with correct inputs -> the visible state converges to what
it would have been with no error, hiding latency. Builds on the deterministic sim (nx_lockstep) so a
resim is bit-exact. Pure integer. 100% sovereign. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_lockstep.nx
imported by: nx_rollback_exceed_gate.nxnx_rollback_gate.nx
structs
| none |
consts
| 32 | const RBX_BELOW: i64 = 0 |
| 33 | const RBX_PARITY: i64 = 1 |
| 34 | const RBX_EXCEEDS: i64 = 2 |
functions
| 8 | func rb_copy(dst: *i64, src: *i64, n: i64) -> i64 { var i: i64=0; while i<n { dst[i]=src[i]; i=i+1 } return 0 } called by 1: rb_resim |
| 11 | func rb_advance(state: *i64, k: i64, inputs: *i64, from: i64, to: i64) -> i64 |
| 18 | func rb_mispredict(predicted: *i64, real: *i64, t: i64) -> i64 called by 1: main |
| 25 | func rb_resim(out: *i64, snapshot: *i64, k: i64, real: *i64, confirmed_tick: i64, to: i64) -> i64 |
| 37 | func rb_delay_latency(net_delay: i64) -> i64 { return net_delay } called by 1: main |
| 38 | func rb_rollback_latency() -> i64 { return 0 } called by 1: main |
| 39 | func rb_latency_verdict(delay_lat: i64, rb_lat: i64) -> i64 called by 1: main |