Elegant, Book-Based Interface for the Interactive Fiction Compass

Elegant, Book-Based Interface for the Interactive Fiction Compass

Given the popularity of the IF Human Interface Device (IFHID) I thought I’d share some thoughts on the potential for pairing the device with a book.

The goal of the IF compass is to make navigation intuitive for the player. The device employs a real compass module that points in the player’s direction of travel. Colored LED’s (red for ‘locked’, yellow for ‘closed’, and green for ‘open passage’) highlight the available directions of travel. Touching the compass dial in any of the available directions moves the player to the corresponding location. A small e-ink display notifies the player of their current/adjacent location(s), and additional status information. Taken together, the IFHID affords making spacial navigation intuitive, thereby enhancing the player’s mental model of their environment and making for faster navigation.

Here is a concept design as of this writing:

The device, measuring approximately 101mm x 169mm (4" x 6") may be made just slightly thicker than a standard calculator and is designed to be self-contained. It’s Rasberry Pi Zero embedded device is capable of acting as a fully-featured wireless web server for use either with a phone, desktop or connected independently via HDMI to a television or monitor.

Of course, it has the capacity to come bundled with several works of IF, from Adventure! to Perdition’s Flames.

Interfacing with the IFHID as a server is fairly obvious. My thoughts turn to a classic asthetic–how could the device be paired with a book?

First, let’s examine an example of early 13th century handcrafted typography:

image

Notice the “humanist” proportions and especially the generous margins. The margins are wide primarily because books at the time where cherished possessions reserved only for the wealthy. Books were studied intensely by their owners who often wrote lengthy notes in the margins.

We can use spacious margins to permit the player to highlight (literally) an object in the text and make notes on what the object is used for. When the player finishes the game the book will be filled with thoughts and solutions, observations and recorded “Aha!” moments.

Notice this note-taking is different than mundane map-drawing as we’ll see.

On the technical side we can efficiently typeset a book with similar proportions with LaTeX. Here’s an example I typeset of Plato’s Euthryphro:

Let’s have a look at the IFHID;s display again and compare it’s information with the Plato typesetting above:

display

See the ‘Sec 2a’ in the display? That’s the section to read in the book!

Now, I know what you’re thinking, “Cooper, if you do that the player is going to end up flipping back-and-forth through the book until their thumbs go numb!”

Well, maybe not–it’s all about the organization of the book. Here’s a rough outline after the front matter (Forward, Table of Contents, Instructions, etc.):

  • "Public" Room One
    • VariedDescription One
    • VariedDescription Two
    • VariedDescription Three
    • Decoration One Description
    • Decoration Two Description
  • "Public" Room Two
    • VariedDescription One
    • VariedDescription Two
    • VariedDescription Three
    • Decoration One Description
    • Decoration Two Description
  • Public Area Map
  • Object Images/Descriptions
  • Consultation Material
  • Index

Organizing the book–“public” areas first followed by locked areas toward the end of the book–avoids page-flipping and revealing spoilers. When the player has substantively explored an area we reveal the section (page, really) containing the map. The map shows really only the immediate “public” areas with space in the map and/or margins to 'write in" areas as they are discovered.

I think one or more bookmark ribbons ought to come with the book to make accessing the area map easy.

Now, does the opportunity to “cheat” present itself by reading ahead? Yes, of course it does but the advantage of permitting the player to move through the work as casually or as diligently as they like is by far of greater benefit.

That doesn’t mean that reading ahead releases all challenge from the player. Let’s look at the status window again:

display

For this example, play close attention to the status text:

You lay the vase gently on the pillow

Let’s say you enter a room with the statue. You look up the statue as an object. The description tells you all about the statue’s dimensional features, overall description, historical context, etc. The book, in short, tells you all about the statue–everything you ever want to know…

…except how the statue feels. The player enters

feel statue

The status line above states,

You notice a slight breeze of cool air blowing through the narrow cracks of the statue.

The player responds,

push statue

Then this happens (more or less):

I’ll write more on this idea later, like the idea of authoring first the book and then the code, but that’s enough for today.

1 Like

Hi,

It took me three times reading your idea before the penny dropped. I kept thinking; instead of the device why not have an app, or instead of a book why not have an app.

Until, if i understand correctly, you’re suggesting a physical book not just in terms of resources (text, illustrations, maps etc), but as a solution workbook.

In other words the physical book would be both part of the story and for note taking and solving, where the player would actually write notes in specially reserved areas of the workbook. These could be pencil areas so that, in theory, they could be erased for re-playability.

So the idea is borne out of the fact that, for many styles of games, the player needs to write things down. In the old days, this tended to be a hand-drawn map and some clues. But, of course, this was unstructured and ad-hoc. This idea would formalise this process.

Here’s where i go off on a bit of a tangent…

Some time ago, i looked into the idea of whether there is a viable crossover space between story-based IF and logic puzzles.

If you imagine a continuum between the two, where on the one hand you have stories like novels in books, and on the other hand you have pure logic puzzles. I’m looking at something in between; kind of soft-brainiac plot-lead entertainment, typified by murder mysteries.

What do i mean by logic puzzles?

At the pure logic end, we have things like the Zebra Puzzle, ie a bunch of clues without any plot or explanations wherein you must solve a specific fact.

Examples like this are contrived, but people have made these sorts of puzzle into mysteries;

Example1: Murder at Brainteaser Mansion.

Ok, i admit, it’s not really a mystery, it’s a logic puzzle. But the idea is, could this sort of thing be made a bit softer, keep the element of logical mystery whilst also be entertaining. ie could it also be an IF game?.

Here are some others;

Example2: The Mysterious Murder of Mr. Mentum.

Example 3: Murder at Clue Mansion.

Example 4: Miss Brown Murder

Example 5: Sir Richard Murder.

There are scores of others. Some are quite cunning, like this.

You’ll notice that these are all examples of “grid solver puzzles”. You work through the clues applying positive and negative information to a grid until the grid is complete and the case is solved. After some practice you can get quite good at these and complete them quickly.

My idea was to make something a little more irregular than a pure grid, but nevertheless needed a note-taking approach to solve.

A bit like what i think is being suggested here with the workbooks.

Software

I investigated automated solvers for these and wrote a traditional grid solver and also how to solve these in Prolog.

For example, here’s my solution program for the temples;

:- use_module(library(clpfd)).

solve(Place, Year):-
    Place = [Funai, Toyagi, Uchida, Usui],
    Year = [Y1525, Y1585, Y1645, Y1705],
    Hori #= 1,
    Okabe #= 2,
    Sama #= 3,
    Takahashi #= 4,
    init_dom(1..4,Place),
    init_dom(1..4,Year),

    % clue1
    % Of the shrine in Uchida and the temple built in 1645, one is sama takako and the other is okabe honzo.
    (Uchida #= Sama #/\ Y1645 #= Okabe) #\ (Y1645 #= Sama #/\ Uchida #= Okabe),

    %clue 2
    %The temple in Funai was built before takahashi
    element(A, Year, Funai),
    element(B, Year, Takahashi),
    A #< B,

    %clue 3
    %The temple in toyagi was built 120 years before the temple in usui
    element(C, Year, Toyagi),
    element(D, Year, Usui),
    D - C #= 2,

    %clue 4
    %Hori takesi was built after sama takako
    element(E, Year, Hori),
    element(F, Year, Sama),
    E #> F,
    
    labeling([], Place),
    labeling([], Year).
    

init_dom(R, L) :-
    all_distinct(L),
    L ins R.

% solve(X,Y). to show indexes of Place and Year.

Turns out this can also be solved as a grid using my grid solver program

Thus;

#temples: hori_takesi, okabe honzo, sama takako and takahashi.
#locations: funai, toyagi, uchida and usui.
#dates are 1525, 1585, 1645 and 1705.

#You are given the following clues:

#1. Of the shrine in Uchida and the temple built in 1645, one is sama takako and the other is okabe honzo.
#2. The temple in Funai was built before takahashi
#3. The temple in toyagi was built 120 years before the temple in usui
#4. Hori takesi was built after sama takako

3
4
NAMES {The temple that}
Hori
Okabe
Sama
Takahashi
LOCATION {is in %s}{is not in %s}
Funai
Toyagi
Uchida
Usui
DATE {was built in %s}{was not built in %s}
1525
1585
1645
1705
#C1
uchida,1645,x
#c2
funai,takahashi,x
funai,1705,x
takahashi,1525,x
#c3
toyagi,1705,x
toyagi,1645,x # need at least 120 years
usui,1525,x
usui,1585,x  # otherwise doesnt give enough 120 after
#c4
hori,1525,x
sama,1705,x

#from 3 either
#usui,1705,1
#toyagi,1585,1

# OR
#usui,1645,1
#toyagi,1525,1
# but from 1; sama != uchida, so;
#uchida,okabe,1
#sama,1645,1
# CONTRADICTION

#therefore, from 3
usui,1705,1
toyagi,1585,1

#from 2, takahashi is last
takahashi,1705,1

#from 4
sama,1645,x

#from 1; sama != 1645
uchida,sama,1
1645,okabe,1

# result
#          LOCATION                         DATE
#          funai   toyagi  uchida  usui     1525    1585    1645    1705
#----------------------------------------------------------------------------
#hori      x       1       x       x        x       1       x       x
#okabe     1       x       x       x        x       x       1       x
#sama      x       x       1       x        1       x       x       x
#takahashi x       x       x       1        x       x       x       1
#-------------------------------------------

Here are my grid output for;

Example2


             WEAPON                         ROOMS
             candl gun   knife poiso rope   bedro conse dinin obser sitti
---------------------------------------------------------------------------
Fawn         x     1     x     x     x      1     x     x     x     x
Jake         x     x     x     x     1      x     x     x     x     1
Kyle         x     x     1     x     x      x     x     x     1     x
Lance        1     x     x     x     x      x     x     1     x     x
Sara         x     x     x     1     x      x     1     x     x     x
--------------------------------------------
bedroom      x     1     x     x     x
conservatory x     x     x     1     x
dining room  1     x     x     x     x
observatory  x     x     1     x     x
sitting room x     x     x     x     1

and Example5



              PLACE                          WEAPON
              kitchen   lounge    bedroom    twine     dagger    gun
----------------------------------------------------------------------------
burgandy.lord x         1         x          x         x         1
Green.lady    x         x         1          1         x         x
whitehall.sir 1         x         x          x         1         x
---------------------------------------------
twine         x         x         1
dagger        1         x         x
gun           x         1         x

The others are just as easy except Example1, which actually is techically unsolvable!

Here is my partial grid for Example1:

            TIME            WEAPON          MOTIVE          CLUE
            1  2  3  4  5   po re po ro da  re ra bl gr je  fo ha bl fi No
----------------------------------------------------------------------------
Rose.Mr              x  x   x  x     x                  x   x  x  x  x  1
Tulip.Ms                x   x  1  x  x  x   x           x   1  x  x  x  x
Daisy.Sir   x  x  x  x  1   x  x  x  1  x               x   x  x  x  1  x
Pansy.Lord  x           x   x  x     x            x  x  x   x  x  1  x  x
Lily.Miss   x        x  x   1  x  x  x  x   x  x  x  x  1   x  1  x  x  x
------------------------------------------------------------
footprint               x   x  1  x  x  x   x           x
hair        x        x  x   1  x  x  x  x   x  x  x  x  1
blood spot  x           x   x  x     x            x  x  x
fingerprint x  x  x  x  1   x  x  x  1  x               x
Note                 x  x   x  x     x                  x
--------------------------------------------
revenge                     x  x
rage                        x
blackmail                   x
greed                       x
jealousy    x        x  x   1  x  x  x  x
----------------------------
poison      x        x  x
revolver                x
pole                    x
rope        x  x  x  x  1
dagger                  x

It can also be coded in Prolog;

:- use_module(library(clpfd)).

solve(Time, Weapon, Motive, Clue, Villian) :-
    Time = [T1, T2, T3, T4, T5],
    Weapon = [Poison, Revolver, Pole, Rope, Dagger],
    Motive = [Revenge, Rage, Blackmail, Greed, Jealousy],
    Clue = [Footprint, Hair, Blood, Fingerprint, Note],
    RoseM #= 1,
    TulipF #= 2,
    DaisyM #= 3,
    PansyM #= 4,
    LilyF #= 5,
    init_dom(1..5,Time),
    init_dom(1..5,Weapon),
    init_dom(1..5,Motive),
    init_dom(1..5,Clue),
    Villian in 1..5,

    % assume no one in meeting over 1 hour.
    
    % clue1
    woman(Footprint),
    woman(Poison),
    element(A, Time, RoseM), element(B, Time, Poison), B-A #= 1,
    B #< 5,

    %clue 2
    Revolver #= TulipF,
    Revenge #\= TulipF,
    element(C, Time, TulipF), E #= C + 1, element(E, Time, D), man(D), (D #= Rage #\/ D #= Blackmail),

    %clue 3
    Fingerprint #= DaisyM,
    LilyF #= Hair,
    element(F, Time, DaisyM), element(G, Time, Pole),
    F - G #> 1,

    %clue 4
    element(H, Time, PansyM), I #= H-1, element(I, Time, J), woman(J),
    Rope #\= J,
    Rope #= T5,
    PansyM #\= Greed,
    PansyM #\= Blackmail,

    %clue 5
    LilyF #= Jealousy,
    man(Blackmail),
    element(K, Time, LilyF), L #= K+1, element(L, Time, M), man(M), M #= Blood,
    element(N, Time, Blackmail), N #< 4,

    %additional
    element(P, Weapon, Villian), element(Q, Time, Villian), (P #> 1) #==> (Q #= 5),
    
    
    labeling([], Time),
    labeling([], Weapon),
    labeling([], Motive),
    labeling([], Clue),
    indomain(Villian).

man(X) :-
    X #= 1 #\/ X #= 3 #\/ X #= 4.

woman(X) :-
    X #= 2 #\/ X #= 5.
    

init_dom(R, L) :-
    all_distinct(L),
    L ins R.


% run with
% solve(T,W,M,C,V).
% not enough information given, but will enumerate remaining possiblities

Which is interesting because Prolog can accommodate logic that is not just a pure grid. It can also enumerate remaining possibilities.

Here’s the output;

1 ?- solve(T,W,M,C,V).
T = [1, 5, 4, 2, 3],
W = [5, 2, 1, 3, 4],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 3 ;
T = [1, 5, 4, 2, 3],
W = [5, 2, 1, 3, 4],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 5 ;
T = [1, 5, 4, 2, 3],
W = [5, 2, 4, 3, 1],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 3 ;
T = [1, 5, 4, 2, 3],
W = [5, 2, 4, 3, 1],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 5 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [3, 4, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 3 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [3, 4, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 5 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [4, 2, 1, 3, 5],
C = [2, 5, 4, 3, 1],
V = 3 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [4, 2, 1, 3, 5],
C = [2, 5, 4, 3, 1],
V = 5 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 3 ;
T = [2, 1, 5, 4, 3],
W = [5, 2, 1, 3, 4],
M = [4, 3, 1, 2, 5],
C = [2, 5, 4, 3, 1],
V = 5 ;
false.

So where am i going with this?

Make an entertaining story whose core is a “soft” logic problem (ie one based in plot-related facts not contrived ones). Make sure there are more clues than strictly needed, reveal the clues bit by bit. Allow the player to make notes, until the solution becomes clear.

The bit about more clues than needed is crucial. In pure logic problems like those above, you are only given strictly what’s necessary and sufficient to solve the problem, with no luxury of slack. That’s why some of the hard puzzles are hard - because you need to figure every single fact to solve it.

The idea for IF/puzzle crossover is that you don’t do that. Instead you keep giving the player clues until everybody can solve the problem, no matter their skill level. Of course this also drives the score. Players who solve in less clues score more than those who take more clues.

It’s also entertaining because you can’t get stuck and it’s suitable for beginners and experts alike.

How does this relate to the compass device?

The compass device is the automation of the story in terms of its state and the revelation of clues. It’s basically the game driver, which you would need for a dynamic clue game suitable for all players.

If there was only the book, then you could just read all the clues upfront and there would be no entertainment.

How does this relate to having a physical book

The book is also a workbook. It replicates the purpose of the grid worksheets needed in the pure logic puzzles above. But it is not organized as grid, but a taker of notes in a structured way. So it needs to show how some facts can be used to deduce others without being represented as an off-putting technical grid.

It also lets you make these notes on the pages with information, maps, illustrations etc.


Tangent over :slight_smile:

PS. If you think i’ve missed something in Example 1, let me know!

4 Likes

Love this, but should be moved to its own topic.

You’re right–there’s really not much that can’t be done using an app, that is, except for the aesthetic. What I’m really trying to do is to invite and help players to “get into the zone,” a place where you’re so focused it’s 10:00 p.m. before you know it–and you feel better for it. Programmers (and probably musicians) know exactly what I’m talking about.

What you’ve done (once again), jkj yuio, is expanded and codified the idea.

I’ve never heard of the Zebra Puzzle but yes, this is often precisely what we do when we weave clues into the story and exactly what the “pen, paper, and highlighter” interface is good at. I aim to enable free-form (or ‘grid’ in this case) codifying of thoughts while taking away the drudgery.

Yes! I say also that free-form notes in the margins also help as the reader is reminded of them as they pass through the story. It’s like taking a ‘hint’ of a note before ‘codifying’ the note in the ‘workbook’ section!

Right again! We don’t need to rely on ‘secret’ geographies to make the experience a fulfilling one. I think revealing the ‘public’ areas in the vicinity over time by sprinkling area maps near the end of each region is a great idea. This gives the reader a “geographic scaffold” to work from while retaining ‘discovery’ of the area. Of course, ‘locked’ areas are not revealed at all until we are sure they’ve passed through them.

The ‘public’ maps subtlety leave space for drawing in the newly discovered area. Simply adding to an existing map, I think, adds atmosphere–it makes adding hand-drawn areas more like discovery and less like work, like an early 18th century English explorer finding the ruins and scribbling furiously in his notebook.

Be my guest!

Oh my God…exactly.

“Yep”

And a fine tangent this is!

Addendum: I can’t ‘like’ your post enough. Every time I re-read it I see that you know exactly the concept, especially when I hear your coined phrase, “soft logic problem.”

2 Likes