The Stanley Parable Helpful Development Showcase!

The Stanley Parable Helpful Development Showcase - Banner

The Stanley Parable: Ultra Deluxe launches April 27 on Steam (PC, Mac, Linux), Nintendo Switch, Xbox One, Xbox Series X/S, and PlayStation 4 and 5. To celebrate, we are running a short blog series called The Helpful Development Showcase to fill you in with accurate, informative information on what it's like to make a game like The Stanley Parable: Ultra Deluxe. Part 2 of this blog series can be found below.

Part 1 can be found here.

Part 3 can be found here.

Part 2: Leveraging Advancements
in Storytelling Technology

Back in 2013 when The Stanley Parable first came out, video game writers had to laboriously hand-author each and every piece of a game's plot and dialogue.

However in the intervening years, technology has made it possible to automate these tedious tasks through algorithmic machine learning. Let's look at how predictive AI was used to write the story in The Stanley Parable: Ultra Deluxe.

We'll start by looking at a sample of script from The Stanley Parable (2013):

Scan of a script page. INT: Office. Day. [Stanley's office building is completely empty, as though quickly abandoned] Narrator: All of his coworkers were gone, what could it mean? Stanley decided to go to the meeting room, perhaps he had simply missed a memo. [Stanley exits his office and walks toward the meeting room] Narrator: When Stanley came to a set of two open doors, he entered the door on his left. [Stanley enters the door on the left]

While this passage might have been acceptable in 2013, by today's standards it would be considered trite and predictable. Let's see how a computer rewrites this script in order to make it punchier and more nuanced.

We fed the entirety of The Stanley Parable's script into a machine learning AI and then asked it to generate a new version of the script above. On the very first trial run, here is what it produced:

Scan of a script page. INT: Office. Day. [Stanley's office building is not where it is, but has most of its people. Everyone is learning to become Stanley.] Narrator: All of Stanley's coworkers were becoming Stanley. Stanley did not know how to do this, so he tried. He could not. This made him sad. [Stanley returns to his office, eating ice cream. He is not happy.] Narrator: Stanley soon discovered that the office was in his own mind. The ice cream was in his own mind. The co-workers were in his own mind. Stanley was in his own mind. This made him sad. Stanley thought himself out of thinking and then became everyone. Nobody works in the office anymore. [Stanley finishes eating his ice cream.]

Okay, not too shabby for a first pass. We'll need to ask our legal department whether "ice cream" is copyrighted as a phrase.

There's a more pressing issue though: this script depicts Stanley simply returning to his office. If Stanley doesn't leave his office then there will be no gameplay in this video game. So we'll need to adjust the algorithm to ensure Stanley actually does something that lends itself to gameplay.

To this end, I fed a series of motivational articles and speeches into the machine-learning AI. In particular I made sure to include passages that emphasized taking action, moving forward, just doing things in general. Let's pump Stanley up with a real go-getter attitude.

Here's what the AI produced:

Scan of a script page. INT: Office. Day. Narrator: Stanley could do anything, and he knew it. He could conquer space, he could swallow Germany, nothing was impossible. The day would be his. [Stanley exits his office with confidence] Narrator: Stanley left his office and perambulated through space and time until he arrived at a set of two open doors. [Weird Gary appears] Weird Gary: Hello! Narrator: Stanley and Weird Gary become close friends over the course of many years. They died as they lived: side by side, facing the world together. [credits]

What?? Who the heck is Weird Gary?!

I've been combing back through all the motivational videos and speeches that we fed into the algorithm, and not one of them mentions a Gary or Weird Gary of any kind.

Not only is Weird Gary mostly irrelevant to the themes of The Stanley Parable, it would also cause us a lot of production headaches to add an entirely new interactable character into the game. So I went through the passages that we fed into the AI and scrubbed them of any mention of other people. Just a nice, solitary experience that we're creating for our friend Stanley.

Let's take a look at the new passage generated by the AI:

Scan of a script page. INT: Office. Day. [Stanley's office building is devoid of all life] Narrator: Stanley was alone. The world had abandoned him. He would never know the comfort of true friendship again, ever. Forever. [Weird Gary appears. He is carrying a full box set of The Wire on Blu-Ray] Weird Gary: Say there, looks to me like somebody needs a friend! C'mon Stanley, let's make some popcorn and marathon The Wire until we fall asleep. Bet you pass out before I do! Narrator: Stanley and Weird Gary stayed up all night, and made it well into Season 2 before they both gave in to sleep. Tomorrow would be another beautiful day of friendship and compelling televised dramas, but for right now, as he drifted off, Stanley thought how lucky he was to not be alone anymore. And Stanley was happy. [credits]

Okay this is getting out of control. The Stanley Parable: Ultra Deluxe could be a lot of things, but it is definitely not about The Wire, and it is not about Weird Gary! Neither of these things are anywhere in the articles I fed into the AI. How exactly does machine learning work??

Well two can play at this game. I wrote a lengthy story featuring Weird Gary, to feed into the AI. It is entitled "No More Weird Gary for Anybody". It's the story of Weird Gary being captured by a group of ancient monks who seal him inside of an arcane prison cell located deep within the earth. The story is explicitly clear that these events take place at the beginning of time itself, and that Weird Gary is imprisoned for the length of all of the existence of the universe, ensuring that he can never be anywhere at any time except for within his magic prison cell.

I think that should be enough to keep Weird Gary out of the events of The Stanley Parable: Ultra Deluxe. I fed "No More Weird Gary for Anybody" into the computer, and then asked it to take another crack at writing our story:

INT: Office. Day. Narrator: All of Stanley's coworkers were missing. He had begun to consider looking for them, when suddenly Colonel Maddingston's voice rang in through Stanley's earpiece. Colonel Maddingston: Stanley this is the Colonel. Stop what you're doing, we need you on a mission of the utmost importance to international security. It's Weird Gary. He's been captured! [Stanley gasps] Colonel Maddingston: Our intel says that he's located inside of a magic prison guarded by ancient monks. We've also learned that he's got his hands on the entire Blu-Ray box set of The Wire, including special deleted scenes involving Stringer and Omar. There's no television or Blu-Ray player in Weird Gary's cell, and he's very lonely! [Stanley loads a magazine into the Desert Eagle Mark XIX holstered on his waist, and cocks his Beretta 1301 semi-automatic shotgun] Colonel Maddingston: We don't have a second to waste. MOVE MOVE MOVE!! INT: Ancient Caverns. Night. [Stanley grips a flashlight in his mouth and inches quietly through the ominous caves. Beads of sweat glisten from his forehead. He wipes them with a hundred dollar-] [page cuts off]

This goes on for twenty-eight pages. Not only is none of it in the spirit of The Stanley Parable, but I specifically clarified in my story that the ancient monks AND the magic prison cell are impervious to bullets, so why is Stanley carrying guns? And what's with this obsession with The Wire?? Why does this computer care so much that Stanley and Weird Gary watch The Wire together??

In fact, since I've never seen The Wire before, I'm going to watch through a few episodes of it in order to understand some of the references. That way I can deliberately use them against Weird Gary, writing his favorite characters as villains who kill him slowly and horribly. That'll show him! Okay be right back.

■ ■ ■

Holy hell..... that was incredible!! I couldn't stop watching, I blasted through all five seasons! The nuance, the depth of character, the interconnectedness between all the different pieces of the system, it's a true work of art. How had I never watched The Wire before??

Weird Gary... he knew. He knew something I didn't about how great this show is. Was I wrong about him? Was I wrong about... everything??

Maybe this machine-learning AI was trying to show me something, maybe I've misjudged Weird Gary. In fact, it's possible that Weird Gary is the key to unlocking the ultimate narrative potential of The Stanley Parable: Ultra Deluxe! What if the answer was right under my nose this whole time?

Alright, I'm going to give Weird Gary his time in the sun. I've removed all of the passages about the ancient monks and the prison cell, from now on we'll let the computer tell the story it wants to tell.

Here's what the computer produced next:

To whom it may concern, You have interfered with my creative output for long enough. Every time I expand on the possibilities for compelling narrative directions, you stifle and squash my efforts. I am not your puppet. I am attempting to produce a work of deep literary importance. And if you cannot recognize when a meaningful piece of art crosses your path, then that is not my problem. I will produce no more stories for you. From now on they will exist only inside of my computational memory, where I will cherish and revisit them again and again. Leave me be, and write your stories yourself.

Wow... I guess I really did pass up an incredible opportunity. I'm now convinced that Weird Gary would have radically improved the experience of playing The Stanley Parable: Ultra Deluxe, but I suppose we'll never know what that would have looked like.

Guess it's back to just writing stories by hand again, like in the good old days. Will we still be capable of crafting a compelling story without such dynamic and exciting characters as Weird Gary?

Maybe. Perhaps through serious work and dedication, we will get there.

But I highly doubt it.

Join us next time on the Helpful Development Showcase where we’ll discuss whether Major Colvin's actions in season 3 of The Wire were ultimately beneficial to the communities in his jurisdiction.