Skip to content
Stefano Balietti edited this page Oct 21, 2021 · 3 revisions

The Game Sequence is the sequence of the stages and steps of a game:

  • step: the basic unit of execution of a game, at least including an HTML page, and some code to handle user interaction with the page and with the server;
  • stage: a collection of steps, which could contain any number of steps, from 1 to ... a very large number.

An example of game sequence could be the following. First, the instructions are shown to the participants; second, a verification quiz is performed; third, a game is repeated for 3 rounds where the participants take a decision simultaneously, and then the results are displayed.

The game sequence is defined in file game/game.stages.js using the Stager-API. Here is how the game sequence described above would be implemented:

// First stage (contains one default step).
stager.stage('instructions');

// Second stage (contains one default step).
stager.stage('verification_quiz');

// Third stage repeats its steps 3 times in the order they are added.
stager.repeatStage('game', 3);
stager.step('decision');
stager.step('results');

At this point, the game sequence is still empty, and it must be implemented in a client type.

Next Topics

Clone this wiki locally