User:Tale glider/sandbox1

From VNDev Wiki
Revision as of 02:25, 17 December 2024 by Tale glider (talk | contribs) (draft about rollback)
Test page where I'm writing a draft about rollback. I have another test page on User:Tale glider/sandbox2

Rollback is an accessibility feature found in some VNs and engines to return to an earlier game state, such as to re-read text or to re-watch CGs.

It might be accessed through a quick menu button (typically labeled "back" or with an icon) a keyboard shortcut, a controller button or a mouse/touchscreen gesture. And it usually goes back one step at a time, with a step being whatever amount of text it usually goes forwards when advancing the text.

Implementation

In games with Log-based history, rollback might work by recording past states of the game and restoring them when returning to them. This will often be limited to go back a few hundred times in a row, as it can't keep track of an infinite number of recorded states to return to. Some games or engines might extend the range by compressing the states, such as only storing a full state every 20 steps and using delta-encoding to store the other ones.

Another approach is to do like undo-based history and "play the script backwards", only needing to track branching. This can often go further back than log-based rollback, but every action will need to have a way to undo it:

  • Text changes can be undone by switching to the previous text. Depending on the implementation, the previous text might appear right away or be shown with an animation where it appears gradually but quickly. Changing the text a transition might make it easier to see that the text is changing, but changing it instantly seems more common, but .
  • Showing sprites can be undone by hiding them.
  • Hiding sprites can be undone by showing them, although the game will then need a way to figure out which expressions to use, where on the screen to place them, and which animations to play if any.
  • Non-looping sound effects might be undone by stopping them. Instead of stopping them right away, the game or engine might fade them out quickly, to make the stop less abrupt.
  • Music changes might be undone by stopping them and playing whatever was playing before they started. Here too, it might make sense to make the transition less abrupt by fading one piece of music out and the other one in.
  • Branching might require a stack to undo (see the section in the history page) or in simple cases (when the branches haven't converged) there might only be one path backwards, which could theoretically be left out of the stack.
  • Animations might be undone by simply playing whatever animations were playing before them. But some engines might play them backwards and then play the previous one, or even play the animation backwards, play the previous one backwards, then play the previous one forwards, to keep the movement more smooth than when jumping between animations.

UI variants

In addition to a regular "back" button, some games might provide a "jump to previous scene" button. This might be a simple jump to a label, or it might internally rely on one of the approaches above, or on loading a premade savegame or an autosave.

Games might also have a history screen with jump buttons to jump back to each line that they list.