Compass HID for Interactive Fiction

Compass HID for Interactive Fiction

By D. Cooper Stevenson

An idea for creating a specialized, physical device for greatly enhancing the Interactive Fiction experience for casual and experienced players alike

Interactive Fiction writers ask a lot from their readers; beyond simply enjoying the story, readers are required to actively manipulate objects, keep track of clues, and all manner of “rules” the author has written into the story.

We watch “Indiana Jones, The Last Crusade,” for example, passively. We enjoy the story as the film’s makers masterfully create the experience’s “feel” through crafted dialog, visuals, and all manner of effects. We, the viewers, receive a pleasing experience as the craters pre-package the story’s logistics, leaving us to simply sit back and, “enjoy the show.”

Not so with Interactive Fiction. Were we to adapt The Last Crusade to IF the protagonist would need to know how to get to Berlin from the castle, figure out the clues left by his father, and know the precice moment by which, “only the penitant man will pass.” IF requires active participation with the story carrying with it the burden of clever thought and (often begrugingly) logistics.

Take for example this excerpt from Stephen Granade’s “Descriptions Constructed:”

In Front of the Capitolium

According to your tourbook, the rectangular shell of reddish-brown brick rising in front of you is the Capitolium, dating back to the reign of Hadrian. The shell is over fifty feet high and deep, and twice as wide. It stands atop a tall podium; luckily there are stairs leading up to the Capitolium. The wall in front of you to the north is missing, giving you room to enter the former temple. The forum stretches out on all other sides, the bulk of it lying to the south.

Well written as this room description is, there exist several facets for the reader to deconstruct: the rectangular shell (dimensions, placement), the north wall, it’s relation to the temple, and the bulk of the forum to the south. Granted, there are only two exits here but IF can often become complex with regards to it’s geographical features and relationships among them.

There’s hope–we’ve now the technology available to make IF feel more like exploration and less like drudgery and it’s roots lie in IF’s venerable component, the compass.

First, imagine a work of IF that renders imagery of each compass direction. When the reader enters, “look northwest,” for example, the parser will give the reader a rendering of the view facing northwest. The views may be created using a flight simulator for outdoors or blender for indoors/caves etc. See Sketching Your Reality in the September issue of Discoverer’s Digest for tips and ideas.

Second, consider a kind of electronic compass, made of brass or quality wood like mahogany, that enables the reader to rotate their view and move to an adjacent location simply by moving the compass in the desired direction of travel. Here is a rough drawing; the self-contained compass is about the size of a hockey puck:


The compass encases a ESP32 chip with HMC5883L compass module. Fortunately, the ESP32 and varients has an accelerometer built in.

Notice the highlighted cardinal points–they indicate available exits.

Rasberri Pi Console

The IF console could be relatively inexpensive with an HDMI screen for imagery and an e-paper display for text. It may look similiar to this Macintosh concept design:

The compass and Pi may communicate via bluetooth, etc.

Built-in microphone pair using voice recognition (feasible when programmed exclusively for the IF’s “limited” vocabulary) via Sphinx et al. rounds out a seamless experience.

Darken the lights with the “IF console” and really live the experience.


You have some interesting ideas, but I don’t know the marketability of a specialized single-purpose device to play IF - especially when tablets, smartphones, e-readers, and television game consoles already exist.

The “electronic compass” you describe sounds suspiciously like a joystick! There are many games which have a built-in compass rose which can be clicked and “lights up” to indicate possible directions without a specialized piece of hardware.

Unimatrix Productions’ Lifestream

Voice recognition and audio games that speak the narration for you are also a thing that have been experimented with - in the long term to provide accessibility, and more recently as a thing for everyone by both Google and Amazon.

And on another level, text-IF isn’t really a “darken the room” type of experience. I will curl up with a book or a reading device, but I’m not really going to sit on the couch in front of a big screen TV to read. At this point, you almost need to leap the brook into graphical adventures or “walking simulators” to make it dim-the-lights immersive, examples are experiences like Gone Home, Observation, and What Remains of Edith Finch, Life is Strange and even Bandersnatch which straddle the worlds of IF and videogame with exploratory visuals and sound. These experiences come on devices and hardware that reside in people’s living rooms already.

In no way do I mean to quash your ideas or your creativity - this is great to brainstorm and discuss - but this is the type of pushback and questions you’d get from this presentation on Shark Tank in front of potential investors that could make it a reality.

1 Like

Ah, my dear friend, I make no claims for commercial viability–I claim only to strive for a satisfying aesthetic and I do thank you for hearing my design.

It is certainly true other electronic systems exist, just as certain as any number of boats travel the ocean. Tell me, would you rather travel in a steel tugboat or a beautifully crafted wooden boat like this:

I suppose, still, turning a “compass” feels (at least to me) a better experience than a joystick… I purposefully chose a physical aesthetic for movement to naturally lighten the mental burden on the player and replace it with natural, physical movement.

For the display I chose e-ink for the text with a tempered high quality display for the graphics (even if the ‘graphic’ is simply an artful map). This is as screens are horrible for reading on; passive displays under indirect lighting is much better. Perhaps the technology on the graphics side does not yet exist, perhaps with careful filtering an existing (small) panel may be made to meet the standards I outline.

The overall goal I set out for, at least so far as the display is concerned, is to bring the “curl up with a book” experience (as you aptly put it) to IF.

Either way, on the point of using an actively lit screen to read (bad), you and I agree.

I strive to make the components as inexpensive as possible to make this a DIY project. I believe the compass chip is less than $8.00. I hope someone will take the idea and create a ‘howto’ for others.

Yeah, given the limited market (not to mention the herculean effort required to market the system) there’s no way I would present to investors, “Shark Tank” or otherwise.

All in all, if I am humbly recognized as the first to think of it and have the guts to present the idea then that is “just fine” with me.

Thanks for the feedback!

1 Like


I like the compass idea, but i think a dedicated input device should do more than just direction;

Firstly, rather than a true magnetic compass, i think you need an accelerometer to detect the movement, but the hardware idea is mostly the same. I also think you need some LEDs (for example to show directions available) and maybe a few small pushbuttons.

Further, IF can have up to 12 “compass” directions when you add in, “up”, “down”, “in” and “out”. These extra ones would need to be shown somehow, although you could probably just get away with “up” and “down” as “in” and “out” are usually aliases.

The push buttons could perform some common operations such as looking around and examining things. Perhaps they could be user definable. But i think worth having.

I’ve been building projects based on the ESP8266, which is similar to your suggestion and using Wifi rather than BT since it can connect to your home LAN and work with a desktop app - I think there is a lot less appeal for this device as a mobile app companion.

Further, i totally agree this is not a commercial viability, but it would be quite fun to make.

If you’re interested in putting some hardware together, i can help with the embedded SW and IF interfacing. From my point of view, the aesthetics is the biggest hurdle, not the technical part. Obviously it has to look and feel nice. Perhaps that’s something you have expertise in.


You’re likely correct. I mentioned the compass function of the HMC as I was not sure if the accelerometer function recorded rotational movement.

I thought the compass records rotation while a gesture forward or backward indicates movement. Alternatively, a wire ring around the glass face serves as a capacitive circuit where by one or more taps would accomplish the same. Capacitance is, I believe, built into the ESP.

I edited my original post to reflect the LED feature. The ACROBOTIC WS2812B or similar may be useful.

“In, out, up, and down” may be had, perhaps, by touching the glass face, putting the device in a kind of “command mode,” while moving the device. The “touch and move” idea may be better mapped to “examine,” etc. Experimentation is best here.

Good idea.

I’m down for that. I recall seeing somewhere a short-distance protocol (not wifi) that does just this sort of thing. I don’t recall what it was. I remember it mentioned in a video by a young woman who works for Adafruit.

I am. My trouble is that I was diagnosed with ALS last July. I can no longer hold a soldering iron nor am I able to do the development work required. The truth is that while my mind is fine my body can no longer do what is necessary. I am almost completely bed bound…my hands are now going making it difficult to type.

This is the first time I’ve publicly told the community this. I had to cease writing the Discoverer’s Digest; DD was the last thing I felt important to contribute before I die.

I ask for nothing.

The boat pictured above was mine, by the way, and were I healthy I would have turned mahogany compasses to your heart’s content. I am also an expert programmer/admin.

As it is I can only dream up this stuff in the hopes that the concept inspires others.


So sorry to hear about ALS, really terrible.

It occurred to me that the compass would have to have a needle and if this didn’t move then it would be no fun. However, having a mechanical needle sounds complicated, not to mention expensive.

So instead i wondered if the whole lot could be done by a nice display, perhaps encased in an elegant wooden enclosure.

Circular displays are a bit rare, but it could probably be rectangular and we would just display “bolts” or something in the corners.

This, epaper display looks quite nice. I’d prefer a higher resolution, maybe they exist. This one has only three colors. That might be enough. Maybe not.

ePaper looks a lot more “real”, that’s what i was thinking here.


It’s no fun to be sure but I’m content as I feel as I’ve lived three lifetimes; I’ve traveled throughout North America.I’ve gone from shoveling cow manure at age 14 to Quantitative Analysis for the stock market in Manhattan to moving Open Source software legislation in Oregon (including speaking personally with the Governor). I’m hard-pressed to feel anything less than proud of my adventures.

So, as I face the inevitable I do it spitting in death’s eye contented with the knowledge that I lived to the fullest.

You know, like you I considered a working needle but abandoned the idea for precisely the same reasons you point out. Your consideration inspired a second look at the problem. I grant you my proposal is a long way from an actual working prototype but if you’ll entertain my thoughts…

The answer for having a real, working compass may lie in the SENS-89 Tri-Axis Magnetic Position Sensor. Because a picture is worth a thousand words, this $13.00 sensor does thus:

image image

I must now confess that I am not certain if this sensor reads 360 deg. rotation but I believe it does.

Here’s where I go into “fantasy land.”

If the module requires a circular magnet they may be had with Rare Earth Neodymium Magnets costing about $1.50 each.

So, for prototyping, a paper disk demarking the cardinal points is fitted to the magnet and suspend over the sensor by a string.

Later, the upper chamber (housing the magnet) may be filled with compass fluid (optionally) under vacuum. I note that a copper dampening ring is likely the better option. The lower chamber houses the electronics. The entire assembly may be 3D printed before final finish in brass or wood.

Now, if simply placing a off-the-shelf liquid-filled compass module over the sensor is enough then so much the better. You can go as simple or as fancy as you like, even fancier given the sensor’s capabilities.

Note that a ‘real’ compass interface may confuse the heck out of players before they get the hang of it (though card compasses aren’t so bad)…if we succeed in teaching people basic compass skills then I’m certainly alright with that.

I agree. If the magnetic compass ideal I propose is made practical then only the text and/or graphics displays need considration.


How would you stand still? Or keep going in the same direction?

No, just three-axis linear position AFAICT. Though it’s designed to read a joystick (thumbstick?) so it sounds like it has some built-in math to compute the angle of the joystick in the left image you have there. They do have another chip designed to read rotation, but it needs a magnet with the poles side-to-side:


I wonder if it matters how small the magnet is. I suspect a neodymium magnet would be too strong: the data sheet says something like “Above 70 mT the IMC starts saturating yielding an increase in the linearity error.” And it sounds like a typical fridge magnet has a 3-5 mT at its surface.

Yikes! I think I’ll wait until Walmart or Target starts selling a $5 plastic version of that last one, thanks. But now I’m curious: what makes a compass with a locking button and a double-jointed lid (with protractors on each joint) worth $780 US? It was pretty funny juxtaposing the retail price with her saying “When I was designing this, my husband was able to build me a functioning prototype in our garage.”

1 Like

Thanks! Perhaps, then, the MLX90393 will do the trick. Here’s a demo. The sensor may also, of course, be used with a display. <-- this link features a pretty neat howto.

I posted that compass to /r/geology; they said the same thing.

Here you go.

I’ve been thinking we don’t actually need a magnetometer as, presumably, we don’t wish to display actual north or south - only the direction within the game. Instead we would want some kind of compass “display” we can manipulate.

Previously, i was thinking about perhaps ePaper, because it looks more like a surface than a display, but your suggestion of mounting a liquid filled compass got me thinking;

What if we put the electronics below a real compass and made little wire coils, one under each of the 8 compass points. Energising a coil would cause the compass needle to point in that direction.

Like you point out, the compass can be as cheap or as fancy as we want.

The compass needed would show direction within the game, and around it we might make a metal bezel with holes within which we put LEDs that show all available directions.

Instead of a magnetometer, we’d have an accelerometer, which would act as input. Turning or tilting the compass could be used as a movement instruction.

The whole lot would look just like a real compass, because essentially it is!


jkj yuio, I could quote your post all day long but presuming a low-power energized coil works (brilliant) your idea combining this and an LED ring is the way to go!

Also, the ESP32 has capacitive button capability built in!

Edit: So now I get to thinking about it. Using your design it means that we only need wires running down to the compass module. This includes wires for the button leads as desired.

If we apply two buttons for look direction (look left, look right) it would make it easy for the player to look around each cardinal point. The compass would move corresponding to the look direction as we “bump” the voltage from one coil to the next upon a button being pressed. I think it would look cool to tap a button to look left and watch the compass “magically” turn to the direction I am now looking with the LED’s showing the available exits relative to my vantage point.

If look buttons are used then we need only to run wires to the main board. This opens up whole new avenues for design. First, leads may be wired directly from the Raspberry Pi’s GPIO pins eliminating the need for additional micro controllers.

Second, you open up all kinds of new form factors, like a “clam shell” e-ink display with the compass module sitting on the table. If this is the case then the compass becomes your IF portal, very roughly similar to this quick mockup:

The apparatus may now even be a kind of stand-alone “IF compass keyboard” connected by USB if you wanted (though the unit would need a Teensy or other micro-controller).

Your idea is also great because the compass will always point precisely (or close to) the eight cardinal points.

Overall I find myself thinking (and if you’ll pardon the language), “damn that kid is smart!”


Imagine if, with this compass, we built a world models where we can look to our left and decipher glyphs created thousands of years ago.

1 Like

Here’s a second concept design, details coming soon…

1 Like


I like your designs, very inspiring.

The second design is better than the first from a technical point of view because it allows us leeway in the placement and sizes of the parts. In the first, the screen must fit exactly in the cover (there is also a connection problem with this design as wires don’t like hinges).


I do think it benefits from a small display of some kind. A problem with the original compass concept is, despite showing available direction, the player must somehow know where they go already. With the screen, we could display a micro-map, ie the current location and the immediate vicinity at the very least.

RPI zero is a good choice. I am thinking that, as a peripheral, perhaps this device should be powered over USB and possibly use that same connection for data. This would eliminate Wifi and, importantly, Wifi setup problems. Also we won’t need batteries in the device. This is significant because all of the embedded devices we have discussed are somewhat battery hungry. For example i have an ESP8266 here and it eats batteries mainly due to the Wifi transceiver.

Setting up a USB to RPI should be easy for people because there are already well established RPI USB drivers out there for pretty much all systems (thinking Windows/OSX/Linux).

So now;

All we need is someone interested in making this a Kickstarter project. Who wants to head it up and champion the promotion of the idea and deal with KS. Some people are very good at promoting idea, i’m not so good at this.

But, i volunteer to write the software and get the electronics working. Ie the embedded hardware, not the fancy case.

cstevens, can be lead designer of the “Look” and help locate where we can source the compass parts, the body and the buttons. If you want to do that.

The project would be a fancy toy for IF aficionados and not a commercial proposition. The production would be low volume, but i think also the customer cost of the unit could be kept reasonable.

All of the software and designs would be open source.

Applicants please form an orderly queue, don’t all rush :slight_smile:


A transparent OLED over the compass module would be cool:

Version 3:


  1. Smaller size without sacrificing display real estate
  2. Ergonomic compass/status display
  3. Faster Rasberry Pi A+ for real-time speech recognition
  4. Stepper motor simplifies design/construction

This concept leaves out some components like the LED ring, microphone, and the 50mm brass compass base for clarity.

The unit may be made even smaller through the use of a Orange Pi Zero Plus2 though given reports that may be asking for trouble. On the plus side, headers and circuitry for mic and speakers are built-in.

Voice recognition is preferably handled with Tensorflow voice recognition though PocketSpinx voice recognition is likely the most practical of the two.

Just chiming in here to say I’m a big fan of all the prototype illustrations!


I’m so glad! If you like, early in my IT career I discovered the value of “early and often,” that is, expressing ideas often no matter how half-baked they may seem–don’t be afraid to express yourself.

The community will look and say, “that won’t work…that won’t work…but that will” and we take off from there.

Putting what is basically a kitchen timer between a PLC and the wax injection mold nozzle is nuts–but it’s just what’s needed to wax inject a large Pratt-Whitney jet engine mold for casting.

Last night/this morning I thought of “the commuter IF,” an wearable apparatus like the above except without the compass (say, “show compass” or tap a capacitance touch sensor to switch to nav mode having the compass display on the e-ink screen) and thinner with the e-ink display “lopping” over your wrist.

The physical form factor using the Orange Pi looks a little like this:


When you combine this with my book-based IF idea you get IF that you can play to pass the time on the subway.

1 Like

I saw a display computer tower in Best Buy whose side panel was a working transparent glass screen and I stood ogling it for about 20 minutes. I don’t even remember if it was an actual feature of that computer or just for the display model (it was running an in-store attract mode with the computer’s features and specs.)

Transparent glass monitors are fascinating and beautiful, but I imagine not use-practical for consumers as they seem to require a light source and you’d probably need a blank background wall to read text. I suspect they’re best for commercial and retail installations, art and museum displays as above, and probably news and sports shows with their fancy monster-touch screens they like to use on air.

But how cool would it be to play a strategy or board game against another live person with a transparent screen as the map between you!

1 Like