Persistence In Scenes

Posted On: 2020-02-03

By Mark

In previous blog posts, I mentioned that I was working on what happens when the player changes scene, but I didn't go into much detail about what that is or why it is important. For today's post, I thought I would share a bit more information about what I am trying to achieve - and in so doing hopefully make it a bit clearer how this will be beneficial as a storytelling tool.

Using Scenes

Many game engines (such as Unity) divide up the game into scenes - much like a play or film would be divided into scenes. Unlike plays or films, however, scenes in games are interactive - players can move around, perhaps picking up and throwing objects. Eventually, the scene ends, the player moves to the next scene, and (ordinarily) everything the player did (all the objects they moved or interacted with) is forgotten. If the player ever returns to that same setting (perhaps in a new scene at a later time) everything will appear back in its proper place, exactly the same as for any other player that enters that particular scene.

For many games, the situation described above works. Perhaps players are on a linear adventure, where they never return to the same setting. Perhaps bringing all the enemies and objects back makes satisfying gameplay - with players overcoming the same enemies and obstacles every time they return. Perhaps there's limited interaction altogether, and the player can't actually change the game world in a way that they would notice on return visits.

Yet, for just as many (or more) games, there is a need to persist some things beyond their scene. This could be for gameplay reasons (such as optional pickups that don't respawn) or for narrative reasons (such as referencing a particular player choice or action.) Regardless of the reason, developers that wish to persist information between scenes must implement something of their own* to do it - both to store the information and to use that information to alter a scene after it loads.

Narrative Benefits

While the sandbox I am using to test the scene changes has limited narrative capabilities, I am already beginning to see the start of some of the benefits of persisting changes. Creatures that wander across a scene transition disappear from the current scene, and reappear in the next (if the player follows them.) Objects that are moved persist in their new location - an essential first step in the narrative reacting to the presence or absence of certain objects. Finally, and perhaps most importantly, injuries (or healing) sustained by any living creature are persisted - giving permenance to core action gameplay verbs (such as "attack"). I am hopeful that these benefits will combine together to reinforce the narrative theme of the weight of consequences.

Conclusion

Hopefully it's now a bit clearer what I have been working on, as well as what narrative benefits it provides. As always, if you have any thoughts or feedback, please let me know.