Methods
fromInitAttributes()
Deserialize from a the InitAttributes format (i.e. parsed JSON).
TODO: this could/should maybe support partial deserialization,
which means MP might actually send only the bits that change.
- Source:
launchGame(playerAssignments)
Start the game & switch to the loading page.
This is here because there's limited value in having a separate folder/file for it,
since you'll need a GameSettings object anyways.
Parameters:
Name | Type | Description |
---|---|---|
playerAssignments |
A dict of 'local'/GUID per player and their name/slot. |
- Source:
pickRandomItems()
Change "random" settings into their proper settings.
- Source:
toInitAttributes()
'Serialize' the settings into the InitAttributes format,
which can then be saved as JSON.
Used to set the InitAttributes, for network synching, for hotloading & for persistence.
TODO: it would probably be better to have different paths for at least a few of these.
- Source: