DEV Community

Fran Tufro
Fran Tufro

Posted on • Originally published at onwriting.games

probabilistic foreshadowing

Something that particularly interests me about the foreshadowing technique is that it is a local element connected to the global story.

By “local element,” I mean that it is something that appears in the story momentarily with the aim of providing a hint toward an important event.

As it is something that “predicts” the future of the story, it is very difficult to do traditional foreshadowing in a game where the player’s decisions matter and significantly affect the story.

In the latest iterations I made in Dance Of The Spirits, I have been experimenting with something that I will call probabilistic foreshadowing .

I am going to heavily rely on the concept ofsilent evidencefor this.

If we consider that the player makes decisions with incomplete information, we can have certain moments in the game where we plant a random foreshadowing.

Imagine a situation where you are talking to many people and they all share their mood:

<span style="color: #000000;font-weight: bold">JULES:</span>I'm feeling great to be honest.<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #000000;font-weight: bold">LINA:</span>I'm hella tired, it's been a nightmare week.<span style="color: #a61717;background-color: #e3d2d2"></span>Lina looks over your shoulder.
You get curious and turn around.<span style="color: #a61717;background-color: #e3d2d2"></span>Bambie is approaching the Circle of Trust. 
They're wearing a dress that looks like it was made by the devil himself.
You can't quite place the color. It looks like some shade of blue.
But a blue that's been chosen for the end of times.<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #000000;font-weight: bold">BAMBIE:</span>Sorry I'm a bit late. You were already expressing how you feel?<span style="color: #a61717;background-color: #e3d2d2"></span>Lina rolls her eyes.<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #000000;font-weight: bold">[bambie_foreshadow]</span><span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #009999">(50%)</span><span style="color: #000000;font-weight: bold">BAMBIE:</span>I'm...<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #000000;font-weight: bold">set</span><span style="color: #008080">bambie_feels</span><span style="color: #990000;font-weight: bold">happy</span><span style="color: #a61717;background-color: #e3d2d2"></span>Bambie looks straight at you. 
    They smile.<span style="color: #000000;font-weight: bold">BAMBIE:</span>... pretty happy.<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #009999">(50%)</span><span style="color: #000000;font-weight: bold">BAMBIE:</span>I'm...<span style="color: #a61717;background-color: #e3d2d2"></span><span style="color: #000000;font-weight: bold">set</span><span style="color: #008080">bambie_feels</span><span style="color: #990000;font-weight: bold">annoyed</span><span style="color: #a61717;background-color: #e3d2d2"></span>Bambie looks at Lina, then at you.
    They sigh.<span style="color: #000000;font-weight: bold">BAMBIE:</span>... annoyed.<span style="color: #a61717;background-color: #e3d2d2"></span>
Enter fullscreen mode Exit fullscreen mode

We use this random selection to choose silent evidence:

If Bambie is happy, it is because they want you there, and they will help you at some critical moment in the story.

If Bambie is annoyed, it is because your presence there goes against some goal they have, and therefore, later on, they will stand in your way.

The player doesn’t know this; that’s why I say it’s silent evidence. But above all, what’s interesting is that it is defined through foreshadowing.

The interesting thing about this is that it creates a space where the final outcome of the story is not 100% defined by the player and not 100% linear either.

The combination of foreshadowing and their corresponding silent evidence, mixed with the player’s decisions, generates a situation where the player’s choices are not “deterministic” but they do make sense, and that sense was developed in the game with the foreshadowing and subsequent reactions to the state as the silent evidence dictates.

PS: In the code snippet I foreshadowed thatBambie Thugis my favorite Eurovision act this year. If you noticed that, you’re my favorite subscriber, period.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay