Making of 'Your Story'
I made 'Your Story' for the 2019 GMTK GameJam and here is how it came to be.
Planning the Game:
When the topic 'Only One' was unveiled I started brainstorming. I knew that I did not want to make anything Mark mentioned in the announcement video. Those were most of the things your mind would go to. After a while I remembered a game that really stuck with me and that would have fit the topic:
The flash game One Chance.
It is a game which gives you exactly one playthrough. When you reach the end, that's it. Since for this jam I did not know whether I was going to have an artist helping me I decided to scope down, making the game text based. I also tend to often go into the genre of horror, even though I do not enjoy it as much myself. But so it was set! I was going to make a text based horror game which you could only play once.
The challenge I gave myself, was to not hard code any of the story. I wanted to build a game that I could expand on without any effort, so that if I ran out of time I would have a working prototype, and if I would get done fast, I would have a lot of time to create content for it.
Then I began planning out how the game would actually play, and I came to the conclusion that I did not want to make a textadventure game in the common sense, because that would usually involve an iventory and a lot of conditional story branches. Instead I figured if I gave the player set choices to pick from, I would only have to account for them actually doing said things. I could create loops if I was careful and I didn't have to think about changing the description of a room whether or not the secret door had been opened.
Further design choices followed during the first steps of design.
The first Evening:
I started my development process with designing a datatype to represent one text plus its choices. I decided to call them scenes, which might be confusing in the context of Unity, but I did not think that far then. So I splitted my test story into scenes, each scene could have up to 5 choices, which would then reference another scene. A scene without choices indicates an ending. And thus my main datatypes were born.
I then thought about, how to best put a scene into text format, and how to put them into Unity. The answer was easy: TextAssets
Like this I could write my scenes outside of the code or even the main game, and then just import them as an asset into Unity.
Formatting a scene was quickly done, and what I ended up with was a file, which looked something like this:
This was the point when I decided to catch some well deserved sleep.
6 short Hours of sleep later...
I started the next day with writing a makeshift parser to read from the file and create the datatypes. When starting the game all assigned
TextAssest were now loaded in and could be used for the game.
While writing the parser I also wrote a little algorithm that checks the integrity of my scenes, giving me a printout of how many scenes I have, how many are endings, and which scenes are never referenced or which option are pointing to non-existing scenes. This would make debugging the game a lot easier at later stages.
From this point on making the game was pretty straight forward. I created a UI and got it to fill with the text of a scene, and I added buttons which did the same, and were turned on and off according to how many options there were. Obviously clicking the buttons would change the scene according to the ID assigned to each button. And like this I had a story I could click my way through. But one thing was missing...
The main Gimmick
Now I still needed to implement the functionallity to make the game playable only once.
!!!!!!!!!!!!!!!!!!!!!!Warning!!!!!!!!!!!!!!!!!!!!!!
In this I will explain how to potentially reset your game and be able to play it again. If you want to keep the mistery alive, skip this part!
I knew that I could have done this by writing a file, storing it somewhere and then reading from it again. But Unity offers a much more elegant solution which saves a lot of work: PlayerPrefs
PlayerPrefs allow to write information into the Registy, at least on Windows. What it does for the other platforms can be read up under the link provided. It also works for WebGL, but can be worked around by simply using a private browsing. This is also the reason I ended up providing no Web-Build. It would have been too easy.
So what did I actually write into the PlayerPrefs? Well of course I added the ID of the scene that the player just opened, always keeping track of the active scene allowed me to know whether the player had started the game, whether he was in the middle of it, or whether he had finished the game. At first this was the only thing I tracked.
!!!!!!!!!!!!!!!!!!!!!!Warning Over!!!!!!!!!!!!!!!!!!!!!!
Telling the whole Story
The next step I took was to save the story the player had encountered so far. So I simply saved each Scene a player encountered, and which decision they take in said scene. Then it was just a matter of taking the text from the accessed scenes and decisions and putting it all together. To make the final story sound better I made sure that all decisions could be read and make sense if you add 'You' in front of them, like this:
Text in decision
Finish your GameJam Game.
Text in story
You finish you GameJam Game.
Another little help I implemented was the '...'-Decision. Whenever the player took one of those they would not show up in the final text. This allowed me to split longer sections of the story into multiple scenes.
Story Time
I finished most of the coding and design around the 24 hour mark of the Jam. This was better than I had expected and I could spend the rest of the time making graphics and writing the actual stories. I was writing until about 2 hours before the jam ended. Here are some stats:
Words written
4812
Total Scenes
117
Number of Endings
25
Known Typos
Too many!
A little Addition that I also made was having the player enter their name, which would then also be saved and could be referenced in a scene by writing '$name$'. The parser would then replace the value with the saved name when putting it on screen.
What went wrong?
This is quite the question, because I am really happy with the game. I would have loved to make the game browser based, but I had technical limitations and no time to work around them. Luckily I discovered that fast enough. One thing that bothers me, is that the storyline connected to the 'Cabin Window' was very much rushed in the end. And of course, this is the path most players take. I did not think this through enough and spent way too much time writing cool stories along the other paths. Next time I do something like this I might make some straw polls with the community to see how certain decisions might go.
What went right?
A lot of things went right. My friend doing the music (@DJBBone) did an amazing job with the music and got exactly the feel the game needed. I managed to write a really cool system for making 'Choose your own Adventure'-Style games. And I have really enjoyed hearing from people which story they got. All in all a good jam!
Thanks for reading!
Files
Get Your Story
Your Story
Many stories may be told but only one is yours.
Status | Released |
Author | andidebob |
Genre | Interactive Fiction, Visual Novel |
Tags | Forest, Game Jam, Game Maker's Toolkit Jam, Horror, Sci-fi, Spooky, Unity, Vampire |
Leave a comment
Log in with itch.io to leave a comment.