Temporal Coherence

Recent dev effort has continued along the lines of striking off niggles, but focused quite a lot on an important aspect of gameplay – the scene context.

I’ve touched on this previously, the scene context manager decides what ‘transient’ objects should be in the players current location in space. So if you are by a station, you’d expect other vessels to be coming and going, already docked, and so on. This breathes ‘life’ into the game – the illusion that even if you do nothing, the universe is continuing around you regardless.

There were a few issues where using the Wormhole drive left these transient vessels still in the scene – making it seem as if they had all followed you as you jumped from a station to a distant planet. Now that’s been fixed, it has unmasked a lack of temporal coherence in the scene context itself.

If you are watching cars go along a busy motorway, and then close your eyes for say 20s, when you open them you’d be pretty astonished if the motorway was empty, or full of trucks and no cars, or all cars were yellow and so on. You can reasonably expect everything to be largely as it was. Perhaps with some vehicles further along based on their speed, some new vehicles in your field of view, and others having left it. This is Temporal Coherence. The assertion that the state of a system is consistent within reasonable expectation over an elapsed time, given observable parameters and rules. To the player, it’s reasonable to expect pretty much everything in the scene to be as it was if they leave and return within a few seconds, perhaps even minutes, but over hours – and as that lapsed time grows – the expectation diminishes to none at all; the reasonable expectation is only that a credible scene is in place.

As the Wormhole drive is instantaneous, you can (if so equipped) jump from a busy station into empty space, and back again within seconds. If you did, you’d expect the station scene to be pretty much as you left it, a natural and logical expectation. But right now, that scene is destroyed when you leave, and rebuilt anew when you return. This denies Temporal Coherence, breaks the Principle of Least Astonishment for the player, and also breaks a fundamental gameplay concept I want to implement later.

So, you’d perhaps think ‘just don’t destroy the scene’… Well, that’s the easy option for sure, but means keeping all those game objects in memory until you return… And that might be in 5s time, or 5 mins, or an hour, perhaps hours… Or never. Now add ‘Skippy’ into the mix – the happy go lucky gamer who jumps from scene to scene as quick as they can, building up a huge number of scene contexts to remember and keep alive; possibly thousands of objects, and you can see this is a snowball rolling down the mountain already. We want all our CPU time and RAM dedicated to the current scene, not ensuring a scene you visited 20 mins ago is still as you left it should ever decide to return. Besides which – NPC’s will have come and gone since…

How to deal with this? Fortunately easily. When generating the scene context, simply record the time stamp, context, vessel details and state. If a vessel leaves before you do, it removes it’s entry. New vessels add their entry, and so on.

Now, if you leave and return, the scene context manager can rebuild the scene as you left it. It can also make judgement calls on the elapsed time and decide if vessels would have left, or even turned up in the mean time.

There will probably be a limit to this cache, maybe 10 minutes or so… or perhaps there will be entropy on certain entries – shuttles would come and go quickly, but a 2km long ore carrier would persist for some time.

It’s going to form an important part of the gameplay, and not just for ‘realism’ from the players point of view.

Anyway, that’s an implementation challenge for a later day!

SHARE THIS POST

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Mak View all posts by

Comments are closed.

Get an awesome sticky message bar!Download