The Stranger Next Door - Vertical Slice Reflection

So I went dead quiet last year, you may have noticed even if you just check the post dates of all these blogs, to work on my capstone project for my masters degree. This was to be a vertical slice of something I have kind of dabbled in for the last four years or so, a

Real-time, meta diegetic horror narrative focusing on intra-diegetic immersion

At least I think these the words I ended up on, it's a bit of a clusterfuck unless I break down what all of these things mean.

Real-time

So this game runs entirely in the user's real-time. There are not the largest number of games that do this, but you can find them broken down into three ways they approach it: Real-time countdown systems (Mobile games especially, but present in things like MGSV), Timed based events/systems (think Animal Crossing) and Character-takes-time-to-do-a-thing (Lifeline and may other messaging games that simulate DMS). Personally I felt like these all lack something; Real-time countdown systems are just a mandatory wait, time based events are cool, but with the rest of the characters in the game kind of disconnected from real time it's half there and character based waiting is weird when you can then sit in a conversation with them for hours not pressing a button. What I wanted to make here was something felt like it existed, and for that I needed to take in account not just the user's current time, but what every single character had spent that time doing.

So essentially what I ended up with a game that ran for a specific time (five days of real-time) which during events kick off, things happen and depending on the player's interaction they kind of... splinter off into different timelines? This was originally inspired by Lifeline

Fuck lifeline was good

Lifeline was this interesting game where an astronaut contacted you being stuck on an alien world. They (fun fact it never genders the astronaut as when someone is talking to you they don't tend to give pronouns) needed help deciding what to do going forward, often breaking off communication to sleep or to walk a long distance. This fucking ruled, getting this real-time link to something the character was doing really created this immersive experience that I hadn't really encountered before, that is until they were being attacked by weird space rats and I accidentally forgot to give them advice. When I checked in a week later they were stuck in this same question, as if the nature of the game had suddenly dropped into stasis. This was incredibly immersion breaking and I thought... what if I could do better?

So that's kind of what I set out to do.

Meta diegetic horror narrative and intra-diegetic immersion

Hey those are a couple of words I sure did write. So, you may want a bit of clarification on what the fuck that means, let me break it down by telling you how my thought process went. So, you now have a real-time game that's focusing on creating immersion, what best fits it? Well, immersion is about making the player feel like they are present in the game world, what if the game world was the players world? If we build the game so that the player believes that the game is happening around them, that this isn't a game world they are entering but it is in fact someone real contacting them we create a diegetic narrative (a narrative happening in the real world) and we create intra-diegetic immersion (the player's immersion is focusing on making them believe they are legitimately a part of the game).

Well... Lifeline was the inspiration and I do like writing so I would prefer something with text. But while the messaging system in Lifeline was cool, it felt a little too like a basic visual novel with some waiting and I think I want to go further. So I thought about and in the end I expanded that from a basic messaging service to a full social media. This gives me a lot of options for things like multiple conversations going on at once in different tabs to different characters, multi user chat streams, photos/videos/audio uploaded to the system and feed where characters post at set times talking about the story and the background as it goes on. And things kind of spun off from there, as you friend people slowly throughout the game you suddenly can go back to the feed and see what they were doing before you really knew them, get their backstory through a natural means that mimics real life. Suddenly stuff just kind of... made sense and was easy to move forward.

Ok, so this creates a conundrum. So we want it to be as realistic as possible, but if we get it wrong we get it really wrong. For example if you attempt to process natural language as your basic input choice things will sometimes go wrong, the system will not recognise a word or misread a sentence and it will not just create a crack in the immersion, it will shatter the entire illusion I have been building the whole time. So some concessions have to be made, like having three options in response to any question given to the player. These concessions have to be really carefully written too, otherwise you get feedback like:

Looks like I need a 'be mean' option

So in order to create a meta narrative I need to be able to build it into the user's life. This means it has to know details about the user, it has to pretend like it knows everything in order to come off like social media does now days. So if I'm already stealing data from the phone in order to make this work, why not going wholehog. Let's make this shit a horror game. This gives the antagonist of the game an agency beyond what the player usually exects in game, they can time things based off the knowledge of the state of the player (looking at the phone, moving, being outside, in another app etc.). I can also abuse the knowledge of existing social medias and fake phone calls, SMS messages, Facebook messenger windows etc.

Suffice to say people hated loved that.

Now I wanted to make a fully working vertical slice, and since this runs in real-time this means I had to create a set amount of time and I settled on 1 + bonus days worth of content. So... what happened when I tried to pull this off.

The ambiguity of start time

I have this cool, plotted out story, but when does it start? This unfortunately depends on when the player opens the game itself, which within a day could be anywhere from 12:01 am to 11:59 pm, meaning I couldn't really set up any real time events that the player needs to be present for. So I created Day 0.

Ok, first up my day number system goes from Day -2 to Day 5, and they are based around when the player opens the game. If they player opens it on Wednesday, Tuesday is Day -1 and Thursday is Day 1, as an example. Day 0 had to be set up as a day when nothing important happened except for the player first involving themselves in the day, but there had to be stuff going on to encourage them to check in. As such, it has one decent conversation with the main character Robin and the rest of the day is focused on feed updates, comments being posted etc. Days -2 and -1 also serve as content for the player to check out, although the reason for the social media only starting then isn't revealed until the next day.

I did get feedback from players who started really early in the day that their conversations felt a bit off, in that they had this one talk and then nothing really happened, but assuming that they don't start in the early AMs it's not a bad solution.

Hey, fuck time in general

While I'm talking about time I just want to say fuck it, like seriously. I had to account for changes in time zone, checking for what the time is in a system that has ambiguous dates (since they are all set off when the player starts), huge amounts of timing in general and general notification fuckery. In fact in order to create a timing system I needed to structure all the data as Day and then Minutes Past Midnight (MPM) to keep it ambiguous and still be able to reference it

Well fuck

So for this to work the game needed to check a big timer object where the code can go ok it's 10:00am (600 MPM) 18/04/2020 and the game started on 6:00pm (1080 MPM) 17/04/2020 so I need to gather any objects that happened before timing 1080 on Day 1. But then it needs to be realistic, so that if the player say has the message window (which has "Robin is typing..." statuses) instead of the message just appearing at 6:00pm it instead triggers the "is typing..." notification. But how long does that notification stay up? Easy you take the number of characters that Robin is about to say (wait what) and then you times that by a value attached to the character Robin that indicates how many ms it takes for them to hit a single character (why am I doing this to myself) and then that's how long it takes for that notification to leave and the message appear... easy.

BUT IT ISN'T BECAUSE THAT'S TOO PREDICTABLE. So as well as that you have the 'retype modifier' which is how often that character will cancel everything they are saying, making the "is typing..." notification to disappear and then the timer starting entirely. Oh, and each character has a different level of thoughtfulness, so as well as that there is a delay between say when you give a response and they start typing. Oh, and there's a randomisation modifier to how long it takes them to type. Fuck.

Did I mention I wrote this in JavaScript too? Whoops, that language does not do well with time.

Ok, so that's how long it takes me to figure out when I should send a single message, but now we have an additional issue. You see, android doesn't like applications running in the background so I can't have the story actually run all the time, but for the player I need to fake that it actually is. So to manage this when the game first launches or resumes for any reason I have to run what I call the 'retcon' function. This quickly checks everything that should have happen and inserts it ignoring every rule I just stated.

Oh and that example of the timer object? Yeah because events causes changes to the timing events (people who are dead don't post, most of the time) there are actually currently 4 different possible timing files that it jumps to depending on what happens.

Oh and you know how I said I had to account to time zone changes? I didn't. I just made sure that no events would happen in a time that would be affected by daylight savings and then if there was a large (2 hours+) change in time zone I pretend like I thought they had changed the clock to cheat and pulled a Mr Resetti on them. Done

A real r(m)ole model

Everyone types different

I have done a bit of writing in the past, I know every character has a different voice. Yet time and time I was getting the same feedback

See turns out that even though they were differing in words used, writing style, size of words and phrasing etc. it wasn't realistic. So I had to (shudders) stop using capitals at the end of sentances. I had to modify how they typed, when they hit enter and a host of other things to give different feels to each character

You would be surprised how much this changes things

This created not just a different feel within the character's test, but also creates a different feel with the timing. Robin on the left makes you sit there as they type a huge lump of text, and then you have to digest it all, while Marcelle on the right punches out small phrases creating a slightly more anxious and frenetic feeling.

I considered doing an automatic mangling to create proc gen spelling mistakes but I couldn't give up the control.

Shit this is more content than I thought

So for the 1 day + bonus I had to create feed posts for 4 characters, branching conversations, comments and the like. I ended up with 130 timing events that fired over that time, which isn't that much until you consider they almost all branch. I ended up with

60 timed Feed posts 10 or so photos 150 timed Comments 850 lines of dialogue in 4 separate trees

There was also a bunch of existing feed posts and comments ;;

During testing anything less than this for four people who communicate publicly on a social media felt... wrong? Sparse? So I filled it as best as I could and created banter between the characters in order to set things up, but it got out of control by the end. What I should have done was created some basic tools for exporting things like dialogue trees into an easy to import object, but unfortunately the only time I did this was on the very last dialogue tree.

Unusual programming choices

This was not built in any engine, I kind of wrote it from scratch (using existing libraries to supplement)... in JavaScript. See how I figured was this was copying a website, a social media website, so should come with the same curses that exist within that space. If I wrote it in a web language it would allow me to manipulate that and any jankiness would be written off as what people expect to see in web apps anyway. On top of that, running it in a chrome wrapper meant I had access to way more of the phone that I should have (see my BT experiment for examples), so I could write in horrific situations where the phone knew what angle it was sitting on, what type of light was on the light detector (it could tell you if you were outside vs inside for example) and where they were without asking for permission.

As I stated earlier, JavaScript is not the most elegant language for dealing with timing. JavaScript’s built in timing functions are kind of hot garbage, and I had to write a lot of my own stuff in order to deal with it (even after importing moment.js). Also can I just say that triggering and setting up notifications based on timing that look like natural phone notifications is the most inconsistent thing I have dealt with in a long time (sometimes they just don't come, especially if you are in battery saver mode).

Also, the strange thing about making something like this. You know when you get an issue and something doesn't display / work properly how you can google "Issue that I had Unity" and get the answer for the majority of issues you have in Unity? Turns out I couldn't do that at all. The number of games that have this kind of real-time mechanic is really small, and the number that have decided to build it in a weird app / android chrome hybrid way is non existent. A lot of the issues I came up against just didn't have answers through google searches, hell, even if you discount the Javascript element there weren't answers.

Not a helpful google search

Did anything go right?

Well of course it did! When planning this through I decided the best way to approach it was using a good old MVC (Model, View, Controller) set up, and because I planned this from the start I ended up with good backbone where if the central object for each part of the program. Using Vue.JS meant that I ended up with a solid link between the objects that represented the visual display, making updating and changing things a breeze.

Image from Gyazo

The backbone was then set up to do all the previously mentioned timing and appearance controls, and when it came down to actually building the content all I needed to do was set up a new object in the timing JSON. This combined with the fact I ended up building tools to output a Twine file directly to JSON meant that the actual creation of the game is pretty much under control. All new content can be plotted out in a nice visual timeline, that is very simple and not at all confusing by itself, and then that can be outputted directly into the game and the MVC system takes care of the rest.

A 'simple' conversation

Honestly, this original build is kind of why I'm so heavily looking forward to working on this project some more.

Despite all this... I had fun

I do have a pretty solid build now, and I am really looking forward to finishing this fucking nightmare this year. I have so much planned going forward and I have solutions in mind for every part of it, there's whole document that plans out what will happen.

Shit's going to get real very quickly

Add a comment