-1
\$\begingroup\$

In a while I plan to create a story game that would have different routes and endings and I was wondering what would be the best way to save a game of a game like this, if it would be a folder, individual file. Etc.

New contributor
Noel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$
3
  • 4
    \$\begingroup\$ What makes you think that you couldn't get away with a single file containing a list of flags of whether they've taken a route? You'd get better answers from us if you tried something first and asked about issues you encountered doing that, as we'd be able to provide help in an actual context. \$\endgroup\$
    – Vaillancourt
    Jan 9 at 16:58
  • 3
    \$\begingroup\$ This does not look like a problem that needs any particular optimization. You could do the most blunt, naive thing, and it would probably work just fine if all you need to save/restore is the user's current place in the story/flags about choices they made along the way. \$\endgroup\$
    – DMGregory
    Jan 9 at 17:11
  • 4
    \$\begingroup\$ "Maybe the real save file was the choices we made along the way." -- DMGregory, paraphrased. \$\endgroup\$
    – Theraot
    Jan 9 at 20:39
1
\$\begingroup\$

The information you need to save is:

  1. Which step of the story is the player currently on?
  2. What's the state of the game? (variable values, story flags etc.)

This should not be a lot of data, so saving those to a file should be sufficient.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .