Each Game is made a succession of events, from an Admin creating a Batch to players going through Rounds and Stages. Some of those events trigger callbacks that can be implemented by the Game designer. This document attemps to clarify the ordering and timing of these events.
Once enough players have completed the intro steps to start a game, Empirica
will call the
to setup the Game parameters (rounds, stages, any initial setup).
Once the Game has been created and saved into the database,
called, allowing the Game developer to make the final preparations before the
game. Any pre-game preparations can be done in either
onGameStart interchangeably. It might make sense to the Game designer to split
the overall mandatory Game configuration (Rounds and Stages) in
from data initialization (using
set on Game, Players, Rounds and Stages
onGameStart, but it is not required.
For subsequent Rounds and Stages, the Rounds and Stages callbacks are called as expected in a similar fashion.
Finally, when the last Round ends, after the end of Stage and Round callbacks
are triggered, the
After which, the player goes through the exit steps.
The list of callbacks goes as follows in order:
onRoundStartRepeated for each Round
onStageStartRepeated for each Stage
onStageEndRepeated for each Stage
onRoundEndRepeated for each Round