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 toRuntimeConfig
,RuntimePlayer
,Map
and contains other extra informationGameSettings
: aScriptableObject
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 fromGameSettings
base values with optional persistency (backed byPlayerPrefs
). This class can be extended.TransientInfo
: a static class to share data between scenes.DeterministicConfig
: aScriptableObject
containing high-level simulation, input and time configuration. This is an extensible read-only asset.SimulationConfig
: aScriptableObject
containing physics, navigation and other simulation configuration. This is an extensible read-only asset.RuntimeConfig
: contains reference to theMap
asset,SimulationConfig
asset and other gameplay-specific data defined by you. All players in a given simulation have exactly the sameRuntimeConfig
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 toMap
,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.
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.