Skip to content

johanhelsing/bevy_gaff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_gaff (work in progress)

bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode.

It synchronizes only user input and relies on determinism for the simulation to stay in sync.

It also serves as kind of a showcase/demo of the following rust gamedev crates:

On network delays physics state is predicted ahead of time, assuming other players input will stay the same as the last frame. If conflicting input is received later, an older state is restored, and the physics simulation is replayed using the updated input.

This means the simulation stays responsive, and you will always see the result of your own input immediately regardless of ping to other players.

Input is also sent directly between players (p2p, no intermediate server) even when running on WASM, this means that if the players are located closely, mis-predictions will be rare and the latency barely noticeable.

Running it

Install and run matchbox_server

cargo install matchbox_server
matchbox_server

...and run two instances of the "game":

cargo run

The example can also be run "single-player":

cargo run -- --players 1

Or with any other number of players

Issues

  • simulation desyncs on rollbacks

Relevant links

About

a networked (p2p), cross-platform physics simulation example using rollback netcode

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages