This document is about: QUANTUM 2
SWITCH TO

Configuration

This page presents the data structures required for configuring and running the game.

Data Structures

These data structures are essential for the framework's functionalities:

  • GameplayInfo: Collection of final data to start simulation, holds references to RuntimeConfig, RuntimePlayer, Map and contains other extra information

  • GameSettings: a ScriptableObject containing static project configuration data. This is an extensible read-only asset.

  • RuntimeSettings: a static class which contains runtime configuration. Its configuration can be initialized or derived from GameSettings base values with optional persistency (backed by PlayerPrefs). This class can be extended.

  • TransientInfo: a static class to share data between scenes.

  • DeterministicConfig: a ScriptableObject containing high-level simulation, input and time configuration. This is an extensible read-only asset.

  • SimulationConfig: a ScriptableObject containing physics, navigation and other simulation configuration. This is an extensible read-only asset.

  • RuntimeConfig: contains reference to the Map asset, SimulationConfig asset and other gameplay-specific data defined by you. All players in a given simulation have exactly the same RuntimeConfig instance.

  • RuntimePlayer: contains player-specific data, each player has their own unique instance.

GameplaySetup & PlayerSetup

GameplaySetup and PlayerSetup are examples for static configuration scenarios. Both of them are optional and meant to be rewritten to best suit your needs.

  • GameplaySetup (optional): a data structure with static configuration data about gameplay (reference to Map, GameplayController, PlayerSetup to configure bots).
  • PlayerSetup (optional): a data structure with static player configuration (reference to actor, weapons, abilities).

Configuration Initialization

The default implementation expects the all data to be available at the application start-up for the game configuration initialization happening in the menu scene.

In the event of dynamic player and gameplay configuration from code, at least one custom wrapper script implementing the IGameplaySetup and IPlayerSetup interfaces is needed to create GameplayInfo.

The following diagram illustrates the data flow from the initial configuration, using default or custom data structures, to simulation.

fps template configuration flow
Configuration Flow.

Deferred Configuration

If you prefer to defer the whole or part of the process to the simulation start, TransientInfo can be used to move data between the menu and gameplay scenes.

fps template transient info
Transient Info for deferred configuration initialization.
Back to top