Skip to reading
Images, Carousels & Choice Controls

26. Save the right kind of state

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Save Project stores the interface design: images, initial carousel IDs, layout, authored values and scripts. It does not turn every change in a running widget into permanent project data.

Source table from 26. Save the right kind of state, page 47
StateWhere to keep the durable meaning
A discovered gallery pictureA story variable or data collection identifying the image asset. Rebuild the gallery from it when needed.
A carried itemThe actual character inventory.
A settings choiceBoolean, Number or String game variables, plus the intended save/load workflow.
A slider handle positionRestore it from the stored numeric value.
A radio highlightRestore the group from the stored stable mode ID.
A held/hover imageTemporary visual feedback; do not save it as a permanent choice.

Game variables and device-wide preferences are not automatically the same thing. Decide whether an option belongs to a particular save slot or should follow the player across games, then use the appropriate persistence workflow.

Test a real save/load sequence. Make choices, apply them, save, change them, load, reopen the menu and restore the controls. Check both the stored values and their visible effects.

A loaded Boolean can be correct while an already constructed Check Box still displays its previous state. That is the reason for the explicit restore steps, not a reason to change the variable type.

Page 47 of 52Permalink
Go to page