Skip to reading
Text & Sierra-Style Adventures

30. Save, restore and restart

Edition 0.86.3.4

Build a complete text or graphical parser adventure with typed commands, inventory puzzles and press-to-walk controls.

Download PDFView illustrations

The first version uses one quick-save slot. SAVE writes slot 1 under the name The Last Signal; RESTORE loads that slot. The same commands work from either presentation.

Figure 19. Restoring returns the room, inventory, puzzle flags, score and saved transcript together.

Source table from 30. Save, restore and restart, page 33
CommandBehavior
SAVE / SAVE GAMEWrites slot 1. An earlier save in that slot is replaced.
RESTORE / LOAD / LOAD GAMELoads slot 1, if a file exists.
RESTARTAsks for a second command.
RESTART YESStarts a new game after RESTART has been requested. Saved files remain.

The game stores story progress in PCA variables and real inventory, not in temporary local GDScript fields. That is why the repaired radio and score survive restore.

RESTORE is deferred to the runtime. Loading rebuilds script instances, so the controller must not keep waiting inside the script instance being replaced. The new instance handles OnSaveLoaded and refreshes its screen. Keep the deferred call from Appendix A.

Page 33 of 68Permalink
Go to page