Enum ggrs::GGRSRequest
source · pub enum GGRSRequest<T>where
T: Config,{
SaveGameState {
cell: GameStateCell<T::State>,
frame: Frame,
},
LoadGameState {
cell: GameStateCell<T::State>,
frame: Frame,
},
AdvanceFrame {
inputs: Vec<(T::Input, InputStatus)>,
},
}
Expand description
Requests that you can receive from the session. Handling them is mandatory.
Variants§
SaveGameState
Fields
§
cell: GameStateCell<T::State>
Use cell.save(...)
to save your state.
You should save the current gamestate in the cell
provided to you. The given frame
is a sanity check: The gamestate you save should be from that frame.
LoadGameState
Fields
§
cell: GameStateCell<T::State>
Use cell.load()
to load your state.
You should load the gamestate in the cell
provided to you. The given frame
is a sanity check: The gamestate you load should be from that frame.
AdvanceFrame
Fields
§
inputs: Vec<(T::Input, InputStatus)>
Contains inputs and input status for each player.
You should advance the gamestate with the inputs
provided to you.
Disconnected players are indicated by having NULL_FRAME
instead of the correct current frame in their input.