Show / Hide Table of Contents

Behind the scenes, different parts of the game are controlled by a few main scripts. Each of these scripts, named "Managers", are in charge over one part/mechanic of the game.

The Managers in the game are:

  • GamePlayManager - overall in charge of everything, runs the gameplay loop
  • ProposerManager - in charge of updating the proposer UI and loading different ProposerBehaviour
  • DocumentManager - in charge of the documents the players interact with
  • ConvoUIManager - in charge of showing in-game conversations
  • NewsManager - in charge of loading and showing NewsItems
  • MenuManager - in charge of showing/hiding in-game menus
  • CutSceneManager - in charge of loading and displaying cutscenes
  • OverlayManager - in charge of showing overlays

Interactions between Managers

In order for the game to work, the different managers need to communicate. Although technically any script can call on any manager to execute some code, it is good practice to keep interactions between managers confined to a minimum to decrease coupling.

The Cross Functional Flowchart below shows the interactions between the different Managers.

Cross Functional Flowchart of the game

In the main gameplay loop:

  1. Gameplay manager gets next Proposal

  2. Gameplay manager sends the proposal to Document manager and Proposer manager to load

    1. Proposer manager loads the right sprite into the proposer UI and loads the right proposer behaviour
    2. Document manager loads all relevant information to the documents
  3. Proposer manager triggers the animation, and on completion, triggers Document manager to show documents

  4. Proposer behaviour acts accordingly, triggering ConvoUI manager for Conversations

  5. When documents are all returned, Game manager triggers the proposer manager to start the npc evaluation.

  6. Proposer behaviour decides when evaluation is finished and triggers proposer manager to start the leaving animation.

  7. When the animation is complete, proposer manager triggers an event to signal the Gameplay manager.

  8. Game manager passes the processed proposal to the Gamestate to apply its effects.

  9. If any news is generated, game manager triggers an event for the news manager to prepare the news paper.

  10. Game manager gets next proposal and loop continues.

In This Article
Back to top Generated by DocFX