Skip to content

AncientiCe/realtime-sync-core

realtime-sync-core

Game-agnostic realtime sync runtime for server-authoritative multiplayer over WebSockets.

What it provides

  • Fixed-timestep runtime (default 60 Hz)
  • Session manager for start/stop and per-session input ingestion
  • Per-player input coalescing via MergeInput
  • Snapshot and game-event stream per session
  • Optional WebSocket codec crate with MessagePack support

Workspace crates

  • crates/realtime-sync-core: runtime traits and session loop
  • crates/realtime-sync-ws: codec utilities for WS payloads
  • examples/minimal-2d: minimal game model integration example

Quick start

cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo run -p minimal-2d

Integration model

  1. Implement GameModel for your game state.
  2. Implement MergeInput for your input type.
  3. Start sessions through Runtime::::start_session.
  4. Forward client input into SessionHandle::submit_input.
  5. Stream RuntimeEvent::Snapshot and RuntimeEvent::GameEvent to clients.

License

MIT

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages