Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

SaveSessionOptions

What createSaveSession takes.

Property Type Default value Description
account () => SaveAccount undefined Who is playing, read at each read and restore.
onRefuse? (refused) => void undefined Called each time the session refuses the load: a record that does not load, or a restore that throws, at the load, onto her player or onto a saved entity later. The game stops on the load-failure screen.
save? SaveConfig undefined The game’s own save, as defineSave made it.
seed? () => number one drawn from the browser's random source The seed a new game’s random stream starts from, where the save includes random: a fixed one makes two runs draw alike, as a profile run needs.