Crate ggrs[−][src]
Expand description
GGRS
GGRS (good game rollback system) is a reimagination of the GGPO network SDK written in 100% safe Rust 🦀. It replaces the C-style callback API with a clearer control flow.
Structs
GameInput | Represents a serialized input for a single player in a single frame. This struct holds a |
GameState | Represents a serialized game state of your game for a single frame. The buffer |
NetworkStats | The |
P2PSession | A |
P2PSpectatorSession | A |
SyncTestSession | During a |
Enums
GGRSError | This enum contains all error messages this library can return. Most API functions will generally return a |
GGRSEvent | These are the notifications that you can receive from the session. |
PlayerType | Defines the three types of players that GGRS considers: |
SessionState | A session is always in one of these states. You can query the current state of a session via |
Constants
MAX_INPUT_BYTES | The maximum number of bytes the input of a single player can consist of. This corresponds to the size of |
MAX_PLAYERS | The maximum number of players allowed. Theoretically, higher player numbers should work, but are not well-tested. |
MAX_PREDICTION_FRAMES | The maximum number of frames GGRS will roll back. Every gamestate older than this is guaranteed to be correct if the players did not desync. |
NULL_FRAME | Internally, -1 represents no frame / invalid frame. |
Traits
GGRSInterface | The |
Functions
start_p2p_session | Used to create a new |
start_p2p_spectator_session | Used to create a new |
start_synctest_session | Used to create a new |
Type Definitions
FrameNumber | |
PlayerHandle |