Game state is the in-memory data which describes the state of the game world as it is simulated over time. It differs from tags which, although they are also loaded into memory, describe static or initial properties of classes of game objects rather than the current properties of individual ones.
Game state also includes global data for systems like scripting (script globals), multiplayer game modes (scores), and physics (game speed and gravity) to name a few.
Most of this data is saved and loaded from save files.
Datum arrays
Much of the game state is maintained in datum arrays, also called tables. Each entry (datum) in these arrays is used to store the current state of some object or effect.
Since the game world is dynamic, the datum count can rise up to a limit. The following limits are known ("-" if unchanged):
Table | Legacy limit | H1A limit |
---|---|---|
objects | 2048 | - |
cluster collidable object reference | 2048 | - |
cluster noncollidable object reference | 2048 | - |
collidable object cluster reference | 2048 | - |
noncollidable object cluster reference | 2048 | - |
cached object render states | 256 | - |
widget | 12 | - |
flag | 2 | - |
antenna | 12 | 24 |
glow | 8 | - |
glow particles | 512 | - |
light volumes | 256 | - |
lightnings | 256 | - |
device groups | 1024 | - |
lights | 896 | - |
cluster light reference | 2048 | - |
light cluster reference | 2048 | - |
decals | 2048 | - |
players | 16 | - |
teams | 16 | - |
contrail | 512 | - |
contrail point | 1024 | - |
effect | 256 | - |
effect location | 512 | - |
particle | 1024 | - |
particle systems | 64 | - |
particle system particles | 512 | - |
object looping sounds | 1024 | - |
actor | 256 | - |
swarm | 32 | - |
swarm component | 256 | - |
prop | 768 | - |
encounter | 128 | - |
ai pursuit | 256 | - |
object list header | 48 | - |
list object reference | 128 | - |
hs thread | 256 | - |
hs globals (includes "external globals", not just those in the level script) | 1024 | - |
recorded animations | 64 | - |
AI knowledge | 768 | - |
mounted weapon units | 8 | - |
Related HaloScript
Function/global | Type | |
---|---|---|
Displays debug information in the bottom left with the current counts for swarms and swarm component datum arrays. Swarms are groups of Flood infection forms while components are individual infection forms. | Global |
Acknowledgements
Thanks to the following individuals for their research or contributions to this topic:
- gbMichelle (Reversing stock table limits)