#rollback-networking #rollback #ggpo #networking #gamedev #control-flow

ggrs

GGRS is a reimagination of GGPO, enabling P2P rollback networking in Rust. Rollback to the future!

28 releases

new 0.10.2 Apr 23, 2024
0.10.1 Feb 27, 2024
0.10.0 Nov 10, 2023
0.9.4 Mar 30, 2023
0.4.0 Jul 29, 2021

#2 in #control-flow

Download history 202/week @ 2024-01-01 432/week @ 2024-01-08 291/week @ 2024-01-15 239/week @ 2024-01-22 309/week @ 2024-01-29 183/week @ 2024-02-05 259/week @ 2024-02-12 453/week @ 2024-02-19 684/week @ 2024-02-26 459/week @ 2024-03-04 329/week @ 2024-03-11 416/week @ 2024-03-18 528/week @ 2024-03-25 470/week @ 2024-04-01 208/week @ 2024-04-08 326/week @ 2024-04-15

1,616 downloads per month
Used in 7 crates (4 directly)

MIT/Apache

200KB
3K SLoC

GGRS LOGO

crates.io GitHub Workflow Status

P2P Rollback Networking in Rust

GGRS (good game rollback system) is a reimagination of the GGPO network SDK written in 100% safe Rust 🦀. The callback-style API from the original library has been replaced with a much saner, simpler control flow. Instead of registering callback functions, GGRS returns a list of requests for the user to fulfill.

If you are interested in integrating rollback networking into your game or just want to chat with other rollback developers (not limited to Rust), check out the GGPO Developers Discord!

Live Demonstrations

GGRS has two demo apps you can try in the browser! One written with macroquad, the other written with bevy. Both use matchbox. Try it out with a friend! Just click the link and match with another player! (You can also open the link in two separate windows to play against yourself)

🚧 MATCHMAKING CURRENTLY OFFLINE! 🚧

Projects using GGRS

Getting Started

To get started with GGRS, check out the following resources:

Development Status

GGRS is in an early stage, but the main functionality for multiple players and spectators should be quite stable. See the Changelog for the latest changes, even those yet unreleased on crates.io! If you want to contribute, check out existing issues, as well as the contribution guide!

Bevy Plugin

The authors of GGRS are also maintaining a bevy plugin. Check it out:

WASM support through WebRTC sockets

If you are interested to run a GGRS application in your browser, check the amazing Matchbox project! The matchbox sockets are compatible with GGRS through a feature flag:

Godot Wrapper

Godot is a popular open-source game engine. marcello505 is developing a wrapper for GGRS. Find the repository here:

Other Rollback Implementations in Rust

Also take a look at the awesome backroll project, a completely async rollback library. Special thanks to james7132 for a lot of inspiration and fruitful discussion.

Licensing

GGRS is dual-licensed under either

at your option.

Dependencies

~2–10MB
~75K SLoC