Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Restoring playback state when returning to a checkpoint after dying/continuing

0 votes
Hello,

we have integrated Wwise in our Unity-based game according to the documentation, that is, sending events/switches/states according to game state, however we have a scenario where we aren't clear about the "best practice" way to approach it.

Our game engine's handling of audio is comparatively stateless, i.e. it only sends out events, etc., but doesn't really know about the current playback state inside Wwise. Now. we have a checkpoint system which stores checkpoints at certain points in the game, to which the internal game state is restored to should the player die in a subsequent sequence.

We need to restore the playback state (things like background music) to what it was when the checkpoint was reached, but how would we ideally do that? Since we only send out events, we don't know about the playback state of Wwise at a certain point in the game, and much less how we would go on to store it (in a savegame file) and restore it accordingly.

An example:

Let's say we send out events A, B, C in sequence during the course of the game, and have a checkpoint x:

A..... B..... C.....x......

and we die afterwards, and the game is restored to the point in time of x. It would need to restore the state in which Wwise was (which sounds are playing at which volume, which BGMs are at which playback state, etc.) when the player reached x.

Is there a way to store a snapshot of Wwise's current state that can easily be stored in a save file, and restore it later on? Or is there a best practice approach to this?
asked Jul 27 in General Discussion by Chris C. (100 points)

Please sign-in or register to answer this question.

...