Using time and space in CS games

I wanted to run an idea for a game mechanic past you all. One reason is to see if you think it will work and what the likely issues and pitfalls are. I used this mechanic in my CHOMP entry and wanted to get some community thoughts as I work to finish the story.
Secondly I wanted to open up a discussion about different ways of writing CS games.

Caveat: I’ve not played many CoG or HG so I may well have missed games that already do this (grateful to be pointed toward them). I’m also no game design expert, so everything I say here is just my opinion and not founded on anything other than my own experience and thoughts.

CS games are all built on one fundamental mechanic: choices (and variables storing those choices and their outcomes), by definition every game uses choices to drive the game forward. The difference to a book is that in a CS game the player is determining which page to turn to via these choices, rather than always turning to the next page as in a normal book.

But I think there are two concepts that are inherent to any game or story (even standard books): time and space.
In Harry Potter we have a book that takes place over a year and in a school. During the story we move through both time and space (from lesson to lesson, or to the great hall, etc.). And this all means something for the story, such as: Harry has breakfast in the great hall every morning. Here of course, time and space are incredibly passive and just used to provide context (classes in a classroom), pace the story (action dies down at holiday times) and to build the world (world cup every four years).

This is a representation of a story in a book:


Each circle is an event (a fight, breakfast, a lesson, whatever) and each line is a transition. Each event takes place in different ‘spaces’ and each transition takes a certain amount of time to get there (could be immediately after leaving class, or we could time skip by 3 weeks). The important part here is that there is only one route through the story - because it’s a standard book.

And a representation of a story in a CS game:


Obviously the difference here being that there are multiple choices at each event.
The different choices (and their outcomes) can move us through time and space differently. For example, one path might unlock an additional fight scene, which all other paths skip (in time and space).
Different paths can occupy the same space (e.g. the castle) at the same, or different times, whilst telling different stories.

Fundamentally though, I think that CS games are still ‘fixed’ in how they utilise time and space. The movement through both is determined by the author when they write and code the game. The player can’t alter what happens after taking a specific set of choices.

Whilst the player chooses which path to take in a CS game (unlike a book), they are still only interacting with the choices mechanic. Time and space are still passive - they simply observe how they both change through the narrative of the story.

What if the player could choose what to do and when? And do it in (almost) any order?


This doesn’t fully portray what I mean - don’t worry, there is a demo!

Here the player starts in the middle circle (think of a ‘main screen’, or ‘hub’, such as your office, or house). From there the player can pick from many options.
Some options require certain criteria to be met (time: to be 10:30, space: to have visited the museum or achievement: have solved the riddle) - this allows the author to control the overall flow of the story and prevent the player breaking the game. This obviously has implications for balancing the game and making sure it ‘works’ under all circumstances - the overall design of the game would need to fit into this model.

The player can visit a location, which will take a certain amount of time. Then, that location offers some choices, again depending on what other things they have, or haven’t done, or what time it is). Your NPCs can also move around in time and space (visit the pub before 20:00 and Charlie is there, otherwise, he’s at home).

I guess one term for this is ‘sandbox’, which is kind of right, except you sitill have to maintain tight control of what the player can do at any one time. Such a game requires an enormous amount of control flow work to make sure the right things happen at the right time.

The other thing is to make sure this doesn’t all happen at the expense of story - which is why we’re all here after all. One of the key things about this model is the box (the picture isn’t a graph with time and space as axes like the first two, it is contained inside a time/space box). There are set end points for when this time/space box ends (e.g. at the end of the day, or when you find the item, or when you’ve had 10 actions). From here the author then moves the story onwards. I would envision a game consisting of 2-3 of these boxes, joined together by ‘fixed’ story (as per the second diagram).

This is a demo of a game I started and abandoned a little while ago, but it shows the sort of thing I am thinking of: https://dashingdon.com/go/8223
Ignore the story and the writing (and the unoptimised code design) - This was the first thing I did in CS.

The relevant bit here is the mechanic from when you wake up, presenting you with different choices which you can undertake in any order. The time/space box is the period between 07:00 and 09:00 where the player is free to move as they wish amongst all the different options.

Things to look out for: Your phone battery, the different text depending on whether you were in bed or not, the time and what actions you can do and that at 09:00 it moves you on to the next bit of the story, closing off the time/space box.

This is a simplistic version of the mechanic (my CHOMP entry does/will have a lot more going on), but I think it is a sufficient demonstration for some thoughts/discussion.

4 Likes

Your game is set on private. I can’t read it.

About your sandbox idea. Several wips tried a total sandbox, none was finished.

What you have defined is basically the layout of the Hosted game and commercial success Zombie Exodus Safe Haven

One of best games out there. I sincerely recommend you. Time freedom need of eat and sleep and crafting and building

3 Likes

I’ve set it to public, let me know if you can access it. You’re supposed to be able to access private games via the link, so might be an issue on DDs end there.

That’s the second time someone has suggested ZE to me. I should probably try it out!

1 Like

It works and what you are trying with the camp Trip is similar To Zombie Exodus Menu and Shopping system.

So totally I recommend you read the demo and looking the immense complex code @JimD uses and how he made the ultimate sandbox rpg in any interactive fiction media

Sandbox is a fun format! Like @poison_mara has said, ‘true’ sandboxes are hard to code and hard to finish, but ZE is a good example. You might also find people on the forums referring to this game structure as Open Map, from Sam Kabo Ashwell’s blogpost on IF/game types.

The coding part will be a challenge–depending on how big the game gets, tracking where and when players have been could get really complex.

Another challenge that might arise is that players could possibly get stuck if there’s a certain choice they need to hit and they just can’t find it. I think this could be a big issue in a riddle or puzzle sandbox. Like, if the player is in a house and they have to turn off the living room lights before they leave, but aren’t aware of this, they could end up wandering through the house indefinitely without ever triggering the ‘leave’ event. If that seems like a possible issue, some sort of hint system or walk-through might be needed.

Overall, the CS code allows for so much freedom, and your idea of the connected space/time boxes seems great, as long as the code doesn’t drive you insane :stuck_out_tongue_winking_eye: Sounds cool!

(And on a slightly off-topic note, I just love games that do anything weird with time–personally, I’m a sucker for non-linear stories)

2 Likes

The Shadow Horror, where the MC is exploring a creepy house, also has a hub-based system and time plays a role in the game mechanics. Might be worth having a look.

It’s an unusual game as far as CS’s typical mechanic designs go. I had a lot of fun with it and its house-exploration and puzzle aspects. And with the option to have author commentary as you went along, also unusual and very fun.

6 Likes

Assuming I understand what you’re describing … I don’t think I’ve seen any IFs that have done this, but what you’re describing is kind of reminding me of the original version of the horror game Siren, which had a mission select grid that spanned the three days over which the story takes place. You generally unlocked the missions in a nonlinear order, but once you unlocked a mission you could play it again any time you wanted, and a lot of the missions had little side objectives in them that set up things you could do in missions that occurred later chronologically - for example, Character A might discover they need batteries in day 3, so you could go back and have Character B find a battery-powered toy in day 2, then have another section where B takes that item from A so B can use the batteries later, etc.

I think the main challenge with an idea like this would be making sure it’s intuitive and accessible to the player - keeping track of what you have and haven’t done in a game like that can be really difficult/tedious, and it often leads to moon logic situations (something Siren was infamous for) - having to go back and scrub the entire game to find the one thing you can change in the past to advance in the present. But that can also be a lot of fun and rewarding, seeing that cause and effect and how you slowly start pushing the plot further or in the direction you want it to go. In any case, I think this could be a really cool thing to see!

It kind of remind me Red moon: Rise and conquer (a neverending rpg) wich was abandoned some time ago (or so i think) It sure was a huge undertaking. The amount of coding you need just to shape up a stat screen like his… I don’t even want to think about it (I’m already having headache coding my tiny little wip)

1 Like

@Sinnie – There is a lot to digest and mull over in your post.

Right now, I urge you to try the Vendetta demo. This is a project (on hiatus) that is being developed by a very smart and experienced software developer.

It is relevant, because he utilizes what is described as a bicycle hub method of pathing.

Once you experience the demo, and perhaps dive into the discussion thread where some of this is discussed, we can go forward.

I would like to go into this further, but for now I can’t. Once I get other tasks completed I will hopefully return to this.

1 Like

Thanks for the illustrative post, and I can’t wait to play your CHOMP entry!

I think you may enjoy reading this article about the structure of CS games, particularly the spoke-and-hub model (scroll down to the bottom) which seems to reference several of the ideas you mention.

In particular, the linked speech from 1989(!) from the author of King of Chicago references a game made 35 years ago :face_with_raised_eyebrow: touches on a way to put that spoke-and-hub (or loop and grow) into an IF game format.

3 Likes

Do you know how I can get hold of the code?

Absolutely. I spend most of my time figuring out all the possible routes a player can take through the space. I’m not looking at ‘puzzle’ games so much, so should be less risk of players getting stuck - but I definitely take the point.

I’ve been thinking of how you make a hint system that can correctly respond to where the player is and point them to the correct next step(s).

Thanks, I’ll take a look.

My use of ‘time’ here isn’t necessarily time travel, but rather that the player could be choosing between actions that each take a different amount of ‘game time’, thus limiting how much they can do. Also, as the NPCs also move in space and time, if you came to do something later on, the situation might be different had you come to do it earlier.

Thanks, I’ll take a look.

Thanks, I’ll take a look at it!

Don’t get too excited for my entry - at best it’s a stump. I’m hoping to get a more complete version by the time the results go live though.

3 Likes

Look here how looking others code

And We all had to rushed our entries is difficult make a game in a month.

Some thoughts:

  • Fundamentally, this is a hub and spoke structure that you can use when making just about any CS game: for an “area” you have a series of possible subscenes the player can experience, but they don’t have time to experience all of them. From an authorial point of view this is good because it’s less writing than when you’re branching on top of branching, it allows you to re-use the same scene options for multiple choices leading to a longer playtime, and it means a player has potential access to more content on any give playthrough. In Trials of the Thief-Taker, the coin clippers investigation and the masquerade ball chapters are both structured like this, and I’ve been using this approach a fair bit in my WIP.
  • If you want to be more ambitious with this structure you’ll probably make a lot more work for yourself. If you want different stuff to happen in locations based on the time of day or whatever else, if you do too much of that it may become unmanageable to write. Even just having night and day content for each area would massively increase the workload. (A way to manage this but still have it be interesting would be to have some conditional text and the occasional additional choice open up based on time, but keep the main choices etc the same).
4 Likes

This is actually the default game design structure for parser-based IF. (Yes, there has been the odd story-based CS-style constantly-being-pulled-forward design there as well, but not many.) Thousands of games have been made and publicly released in this style as part of that tradition. This is partly because those engines all implement space being divided into discrete areas which are connected in a certain arrangement, and most also include (or can be easily extended to include) actions taking variable lengths of time and certain events needing to happen at certain times.

@Sinnie, you may want to look at a language like Inform 7 and see if it offers something useful to you.

2 Likes

I will say that Inform 7 is probably the coolest programming language of all time, and my ultimate fantasy is a mash-up of the simplicity of CS with the complexity of I7, in some kind of format where authors can sell their games.

4 Likes

It’s been a while since I’ve played it, but you should check out My Day Off Work too. The beginning is basically the same as your demo. :smile:


I also want to make my hub scenes more dynamic, but sometimes, you need to have a scene, dialogue, or choice present in all variations. And from my experience, it’s a real pain to have it fit narratively into different variations of the same scene.

I think this approach works better for game-oriented stories rather than narrative-driven ones, but I admit I’m biased here.

I’ve tried doing this too when I first started, because, hey, more choices! But now I think it’s more engaging if (during a morning routine for example) you can develop the character’s personality through how they do things, rather than choosing the order of what they do. Having a choice of what and when to do is nice, but what purpose does it serve the story other than that, if you need something specific to happen anyway?

1 Like