Truth or Dare


did anybody try to implement a game of “truth or dare” in Inform 7 so far?
The options I see are (1) Threaded Conversation or (2) Hybrid Choices.
My preference is (1), but …

Any ideas?



I don’t know specifically about a “truth or dare” scenario. I’d imagine someone has written about it, interactive or not.

I really liked the concept of Threaded Conversation; especially the fact that there is utility to write responses during testing which generates code for you. I tried very hard to implement it into a game, but found it too easy to lock out early important responses with no way to get back to them once the conversation had climbed too far up the tree. I would suppose there are ways around this if I understood the process better but I became frustrated and gave up.

Hybrid Choices has been doing some amazing things in my current WIP. I’ve hit a few snags but got specific help from the author. Unless you really are in love with keyword conversation I’d look into HC. That extension offers lots of ways to hide choices and manipulate them and change them based on the world-state so the author is not completely limited to hard coded menu trees.

I’ve learned that the less fussy your interactions are, the better experience players will have with your game. It might seem compelling gameplay to require the player to figure out what to ask an NPC, but in practice, helping them along is always better. Even if the player has seen the goose randomly wandering in the wood, they might not think of it as a valid conversation topic. Better to have the game prompt them with a dialogue option. Essentially, code it so the PC remembers important things, even if the player does not.

Hi Barnabas,

Interesting idea, but I would like to know more about the scope of your vision. Is this an entire work centered around PC / NPC interaction, or are you talking about a scene in a larger work?

In terms of the conversation systems, it’s pretty clear that Hanon is very familiar with both, so I would rely on his advice.

My thing is that while the “truth" part will certainly be challenging, I think the “dare” part will be even more so. How do you write a game where the player can just order an NPC to do whatever the player wants? There are so many actions that a player can think of; how do you parse that? Also, although I haven’t played ToD in a long time, I remember that it can get racy. You might want to check out some AIF sites for reference.

While I think what you’re trying to do is virtually impossible — I like people who try the impossible.

Have fun,

Hi HanonO, Hi Skinny Mike,

thank you for your replies! - They definitely helped carry my thinking further.

Especially Skinny Mike’s question (“I would like to know more about the scope of your vision.”) was a very good one.

The idea is a story of a man and a woman going through a crime drama, so while there’s no AIF focus, it’s worth looking there, too. The role in the bigger plot is three-fold: for the player to get to know the player-character, to reveal some secrets that are needed for later puzzles, and to do all that in a compact form to not distract from the rest of the story too much. It’s my first serious WIP, maybe I’m biting off to much at once.

So: At some stage, Truth or Dare is a scene in a bigger whole. The plot doesn’t break down if the “Dare” part isn’t played out but rather manifests in a looong paragraph of text.

I’ll spend the weekend on some conceptual thinking and report back :wink:

Thanks again,


OK, what I have so far:
(sorry, this may contain traces of my day job :slight_smile:)

Six qualitatively different activities need to be considered: Player choosing Truth or Dare, NPC choosing Truth or Dare, “Truth” as player, “Dare” as player (both including choosing one of a set of pre-defined challenges), “Truth” for NPC, “Dare” for NPC.

This smells a lot like “Hybrid Choices”, especially if we keep it simple and assume every “Truth” and “Dare” part can be realized as a a single page (or potentially in the future as a small group of pages). I’ll write up my current ideas for a skeleton for that soon, but there’s a catch:

If there’s, conceptually, a list of “Truth” challenges and a list of “Dare” challenges that are posed to the player - how to decide which one to use when?
I see three options: at random (problem: prevent entries from being used twice), in a fixed sequence (basically, then the entire Truth-or-Dare thing can be done as a sequence) or allowing the player to decide on the NPCs actions (disturbs immersion).

So far, I think about random choices, based on the page-switch rulebook (see Section 3.2 of the docs for Hybrid Choices). But I have no idea how to prevent entries from being used twice.

Better ideas?

Thanks! - Barnabas

Thank you all!

In a recent game :unamused: I used a story page which had cycling text of the story progression which then flipped to another page of choices that basically said “Make your choice”. All the choices were “one-off” and “for” the page of choices. The flip-to is necessary in case the player looks again, I don’t want the previous speech to cycle to the next part yet. The player will only get the “make a choice” text. Then when we get back to making another choice, I send the player to the story page which cycles to the next sequence of the game and flips back to “make your choice” where the one they chose before is now gone since it’s “one-off”.

Each page representing a choice can either describe what happens and then flip-to back to the story page, or lead wherever you want.

Here’s psuedocode:

[code]Story page is a page. It flips to Choice Page.
“[one of]Here’s the first round of truth or dare.[or]Here’s the second round.[or]Here’s the final round.{stopping]”

Choice Page is a page. “Make your choice”

First Choice is a page. It is for choice page. It is one-off. It flips to story page. The cdesc is “Your first choice”.
“You make the first choice, and some stuff happens, then flips back to story page where second cycling text takes over.”

Second Choice is a page. the cdesc is “Your second choice”. It is one-off. It flips to Story page.
"You make the second choice, and this time you end up with a journal page and we flip back to the Story Page.

A page-toggle rule for second choice:
now the player carries a journal page.

Third Choice is a page. The cdesc is “The epic choice”. It is one-off. It flips to Epic Page. It is for Choice Page.
“You make the choice and it is epic! The story moves out of truth or dare into the Epic Scene!”

The Epic Page is a page. “Whoa, there’s some epic stuff happening in this cave!”. It is an end-page.

A page-toggle rule for The Epic Page:
cyoa teleport to Cave of Epicness.

Refuse is a page. It is for Choice Page. It is an end-page. The cdesc is “Stop this Truth or Dare nonsense”.
“You refuse to play truth or dare, and extract yourself from the game.”[/code]

Hi HanonO,

I haven’t quite grasped how the example is working, but I’m laughing my a… off about it’s epicness.
While studying the Hybrid Choices docs, I found this line:

VERY big thumbs-up and thank you! I’ll be back when I grasped the tech.


The trick of it is most people think of choices (in this case actually “pages”) leading to other choices. The weirdness of learning Hybrid Choices is it feels backwards at first…You make a page, then you make several other pages with choice descriptions that are “for” (linked to) any number of other pages. This is actually genius (I think the concept was started by Adventure Book, which was the extension HC is based on) because it’s very easy to link one page via a choice to multiple pages, and if you cancel it or make it unavailable through several different means, it doesn’t show up anywhere else. It would be tedious and harder to manage if the choices were hardcoded into the pages they show up on.

As an example, you can declare “A page can be hostile”. Then you can make several pages which offer attacks as “Fighting the Troll is a hostile page.” You can then make a page called “swing your sword” and say “It is for every hostile page” and it will show up on every one. Then you can write a choice-switch rule for “swing your sword” that fails if the player doesn’t carry the sword and it will automatically make it so the “swing your sword” choice leading to that page will only show up on hostile pages if the player is carrying a sword.

Yup… in my day job, I have a lot to do with “real” programming languages, and working with Inform 7 is mostly about forgetting all of that and starting over. But still, I do recognize publish/subscribe patterns when I see them :astonished:.

With your example, I think I can make everything work nice and concise - except for the random choice. There I have no clue at all.

Assuming we have reached the place where it’s the player’s character’s turn to answer to “Truth or Dare”, and the player decided to go for “Truth”.

What I’d like to do is something like:

PlayerTruth is a page.
"The NPC [one of]smirks mildly[or]chuckles[or]looks bored[purely at random] and utters the question:"
It flips to a PlayerTruthPage purely at random.

(The other rulebooks of the PlayerTruthPages would have to take care of things like picking up journal pages or breaking out of the resulting infinite loop)
This should achieve:

  • All PlayerTruthPages are potentially visited, but usually some are “left over” in any specific walk-through.
  • No PlayerTruthPage is visited twice (the PlayerTruthPages have to ensure termination of the loop)
  • Replay is encouraged because order of pages changes, and chances are that on first play-through one didn’t see everything.
  • Immersion is undisturbed (it would be easy to make the player choose the NPC’s questions, but the player would have to swith perspective which breaks immersion)

The player’s experience should be similar to meeting an aimless patroller. You just don’t know what’s happening next, no matter how often you’ve played the game.
Am I making sense?

One way to do this is a page-switch rule. Rules are nice. You can make one or lots of them. Or one big one that does everything.

[code]PlayerTruth is a page. It flips to randroll.
“The NPC [one of]smirks mildly[or]chuckles[or]looks bored[purely at random] and utters the question:”

Randroll is a page.

A page-switch rule for randroll:
let X be a random number between 1 and 3; [It sounds like it will only pick the number two, but I think this is okay in Inform]
if X is 1:
now the current page is BoringOutcome;
if X is 2:
now the current page is MildlyStimulating;
if X is 3:
now the current page is Woobaby.

BoringOutcome is a page. “It’s just as you would have expected.”.

MildlyStimulating is a page. “Hey, look at that.”.

WooBaby is a page. “Awwright!”.[/code]

[code]ChrisPool is a page. The cdesc is “Confess it was you who fell in the pool covered in toothpaste”. It is one-off. It is for TellATruth.

A choice-switch rule for ChrisPool:
if Chris does not carry used tube of toothpaste:
rule fails.

A choice-switch rule for ChrisPool:
if Public Pool is not visited:
rule fails.

[code]Chris has a number called CPT.

A choice-switch rule for ChrisPlayerTruthPage:
if CPT >= 2:
rule fails.

A page-toggle rule for ChrisPlayerTruthPage:
increase CPT by 1.

Hybrid Choices and specifically structured cycling/random texts is a great way to do that.

Do you mean you’re shifting perspectives between characters? That could be novel - if you switch into someone’s head there’s a list of questions to ask based on your game experience and potential inventory. These are the same questions that can be picked at random and asked of you if you are not the character. Complicated, but very do-able.

That is precisely what I had in mind. I had hoped to be able to do that without a ton of token-things that control the process, but I guess if I wrap the whole ToD-part into a separate scene, I can organize the clean-up.

Now for something completely different:


This is an entirely different topic. I guess I’ll come back to it in a separate thread :-/

On the one hand, “immersion” to me means that the reader/player can slide into an increasing identification with the player-character. Jumping between characters in a scene like that … AH… SCENES! (see above) … breaks that process. Repeatedly jumping from one character to the other and back will eventually leave the player “outside” of both characters, in some kind of an “observer” perspective instead of the intended “identified” perspective.

Elsewhere, I do plan to switch from one character to another, but to do so at a defined “cut” in the story (like “Sherlock and Watson decide to split up - Sherlock goes to the crime scene and Watson to the home of the victim”) and build immersion from there again. The intention is to build suspension by nesting the revelation of some secrets (of the “new” player-character) with the building of new ones (of the “old” player character). Of course, the same happens to questions/puzzles/challenges, with the opportunity to reset some non-essential points the player didn’t accomplish.

As I said earlier, maybe I’m biting off a bit much for a first shot :slight_smile: - but with the help of the community in general and you in particular, I’m confident that it’s just a matter of patience.[/spoiler]

OK, in case anybody cares, here’s the fundament of the solution:

Let’s enter the game with the NPC choosing between Truth or Dare - this is going to show most of the principles:

[code]NPCTruthOrDare is a page.
“Now it’s time for the NPC to choose ‘Truth or Dare’. While he makes up his mind, you think hard about evil tricks to play on him.”

NPCLetsGo is a page. It is for NPCTruthOrDare. The cdesc is “Let’s go”.
A page-switch rule for NPCLetsGo:
choose a random row in Table 1;
now the current page is Page entry.

NPCDarePage is a page.
“The NPC chose ‘Dare’. Now what will you make him do?”


FirstNPCDarePage is a page. The cdesc is “dare idea #1”. It is one-off. It is for NPCDarePage.
“This is where the player launches a ‘dare’ about the NPC.”
It flips to PlayerTruthOrDare.


Table 1 - NPC Truth or Dare Pages
Page (a page)

What this does is:

  1. NPCTruthOrDare brings on some prose and effectively waits for input from the player: There is only one destination page (NPCLetsGo), so there’s no real choice.
  2. NPCLetsGo isn’t rendered, instead it is swapped out at random against one of the pages listed in Table 1. Effectively, this random choice makes it seem like the NPC has chosen Truth or Dare.

Of course, you need to take into account that NPCLetsGo is not really rendered, so the prose has to go into one of the other pages in the sequence.

Fundamentally, the trick works also when there are more pages to choose from, e.g. ten pages of “Truth” questions posed to the player. For that environment, “Hybrid Choices” features like one-off etc. don’t work, I guess playing with additional table columns to manage what has already been visited and what hasn’t should be good enough.

The other part, the player choosing either “Truth” or “Dare”, or which out of a dozen or so questions / dares to raise to the NPC works precisely as explained by HanonO earlier in this thread.