| |
howto:door:adventure [2022/10/13 19:15] – created digital man | howto:door:adventure [2023/03/03 18:22] (current) – My autosave branch was merged with ESR's mainline digital man |
---|
The game in this how-to is [[http://www.catb.org/~esr/open-adventure/|Open Adventure]], a Unix/C port of the original Colossal Cave Adventure game from 1976. | The game in this how-to is [[http://www.catb.org/~esr/open-adventure/|Open Adventure]], a Unix/C port of the original Colossal Cave Adventure game from 1976. |
| |
To have the game automatically load and save a user's game state, I made a modification, which you can find in [[https://gitlab.com/SynchronetBBS/open-adventure/-/tree/autosave|this Git branch]]. This modification adds the ''-a <filename>'' option to automatically load/restore a user's saved game (or create it if it doesn't exist), and then save it when the user quits or if they're disconnected or run out of time. Until such time as my branch is merged with the master branch, this is where you'll need to clone the source from to build it and get the ''-a'' option. | To have the game automatically load and save a user's game state, build [[https://gitlab.com/esr/open-adventure|the project]] with the ''ADVENT_AUTOSAVE'' flag. This adds the ''-a <filename>'' option to automatically load/restore a user's saved game (or create it if it doesn't exist), and then save it when the user quits or if they're disconnected or run out of time. |
| |
When building, specify the (new) AUTOSAVE option: | When building, specify the (new) AUTOSAVE option: |