No description
This repository has been archived on 2026-06-11. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2025-05-24 22:06:58 +02:00
.idea remove wgpu envs for both client and server, since the binaries no longer crash 2025-05-23 00:03:09 +02:00
client configure cargo deny 2025-05-24 19:01:51 +02:00
server handle client connection events 2025-05-24 22:05:45 +02:00
shared configure cargo deny 2025-05-24 19:01:51 +02:00
.gitignore add client, server, shared crates; add rapier physics; add default scene 2025-03-20 16:07:30 +01:00
Cargo.lock remove serde 2025-05-23 00:17:56 +02:00
Cargo.toml add quic networking 2025-05-23 00:09:27 +02:00
deny.toml configure cargo deny 2025-05-24 19:01:51 +02:00
README.md add fly and first person pawns, interpolate between physics ticks 2025-04-12 17:24:04 +02:00
rust-toolchain.toml use stable rust 2025-05-23 00:44:55 +02:00

  • world is simulated using rapier
  • players are moved using a character controller
  • only player deltas are sent over the network
  • the system runs in ticks

What happens in a tick?

Client

  • Receive incoming server state events

    • Check if predicted states match server states
    • Rollback if necessary, and re-simulate to the present using the stored commands
    • Mark the received server state as confirmed, and drop all previous state and command data
  • Handle Inputs

    • Accumulate inputs to command
    • Send command to server
    • Add command to history
  • Calculate a new predicted state

    • Predict commands from other players
    • Apply commands
    • Push new state to history

Server

  • Receive Player Commands

    • Ignore out-of-date commands
    • Store commands for future ticks
    • Advise Sync Corrections if commands come to slow, or too quickly
    • Push to command buffer
  • Calculate a new state

    • For critical commands (e.g. fire), rollback to adjust for the clients ping
    • Perform hit registration
    • Predict commands from other players
    • Apply current commands
  • Calculate deltas for each player

    • Occlusion Culling
    • (Frustum Culling)
    • Send deltas to their respective clients