probabilistic foreshadowing
Tags: gamedev, writing
Published: 2024-05-10 12:39:05

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 of[silent evidence](https://onwriting.games/daily/silent-evidence/)for 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>
```


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 that[Bambie Thug](https://www.youtube.com/watch?v=BNc5zTYkTaQ)is my favorite Eurovision act this year. If you noticed that, you’re my favorite subscriber, period.