State
The entire current and future (to an extent) state of the game is deterministic.
Core State vs. Derived State
Think of derived state as a snapshot of what the core state produces at a
specific point in time. Here are some examples:
Core state |
Derived state |
empire alloy production rate |
how much alloys does the empire have |
where is this fleet trying to go |
where is the location of this fleet? |
The core state always has a start time and a decision time (see below)
between which all derived state can be interpolated. As a result, no
computation occurs on the server until a decision time happens.
Decision Times
A DecisionTime
is essentially a timestamp at which point some kind of
non-determinism is introduced. DecisionTime
s are generated from either:
- The
CoreState
itself, including AI decisions
- A player makes an action that's received by the server
At this point, an RNG external to the CoreState
(i.e not part of an
individual AI's decision making) is used to make some important decisions about
the game (i.e battle results, etc.) in order to create a new CoreState
.
Probabilistic Values
Testing mermaid:
graph TD
Start --> End