Skip to content

Netplay debug mode + checksum validation for deterministic sync#95

Merged
JRickey merged 7 commits intoJRickey:mainfrom
TechnicallyComputers:main
May 3, 2026
Merged

Netplay debug mode + checksum validation for deterministic sync#95
JRickey merged 7 commits intoJRickey:mainfrom
TechnicallyComputers:main

Conversation

@TechnicallyComputers
Copy link
Copy Markdown
Contributor

@TechnicallyComputers TechnicallyComputers commented May 3, 2026

updates to netcode - see netplay_architecture.md for full details on updated architecture and netcode_agent rules updated.

execution gate added to (src/sc/sccommon/scvsbattle.c) in order to ensure that when running with netplay enabled, vs battle waits momentarily to execute battle simulation for remote user to ready up, so both execute simultaneously.

with input delay = 0 gameplay debugging should remain fully deterministic with 2 local instances sending layer 3 data to eachother.

with input delay = 10 observable "millisecond delay" is expected visually and predictive inputs are depended on more heavily, which are prone to desyncs with fast/angled joystick movements. This is not an issue, there simply is no rollback logic yet implemented.

https://x.com/CCryptid1989/status/2050761257372860821

Video proof of 2 local sessions networked together demonstrating remote inputs accepted only for P2 on the right window, and precise fox up+b movements without any desyncs.

Log files generated at XDG_DATA_HOME for each session provide checksums of each game tick to prove it.

Commands to run tests locally:

XDG_DATA_HOME=/tmp/ssb64_test_host
SSB64_NETPLAY=1
SSB64_NETPLAY_BOOTSTRAP=1
SSB64_NETPLAY_HOST=1
SSB64_NETPLAY_LOCAL_PLAYER=0
SSB64_NETPLAY_REMOTE_PLAYER=1
SSB64_NETPLAY_BIND=127.0.0.1:46200
SSB64_NETPLAY_PEER=127.0.0.1:46201
SSB64_NETPLAY_DELAY=0
SSB64_NETPLAY_SEED=901
./BattleShip

XDG_DATA_HOME=/tmp/ssb64_test_client
SSB64_NETPLAY=1
SSB64_NETPLAY_BOOTSTRAP=1
SSB64_NETPLAY_LOCAL_PLAYER=1
SSB64_NETPLAY_REMOTE_PLAYER=0
SSB64_NETPLAY_BIND=127.0.0.1:46201
SSB64_NETPLAY_PEER=127.0.0.1:46200
SSB64_NETPLAY_DELAY=0
SSB64_NETPLAY_SEED=901
./BattleShip

Netplay debug sessions with the commands above execute a fixed match with Fox and Mario.

Merging upstream again 05/02/2026
Input tick syncing support and debugging for P2P, logging support for P2P debug functions to assist in development and testing.
Worth noting that gameplay is still not in sync, only input ticks, but proves that match start barriers work, need to add handling for syncing the execution time of the match.
Added simulation execution gating support, to match the input tick syncing, next steps are to add checksum validation for gamestates and inputs to validate determinism.
Architecture documentation updated.  Existing debug commands were updated in place rather than introducing new ones to do this.
MERGE Full screen toggle crash upstream patch
More patches, syncing with master for consistent netplay codebase 05/02/2026-20:57
Add support for determinism validation via checksum on game ticks and player inputs & positions.  Still lacks rollback/correction, but log files during netplay debugging include checksum values for game ticks to verify deterministic execution of simulations.
Merge upstream 05/02/2026_22:45
@JRickey JRickey merged commit 1e1837a into JRickey:main May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants