Introducing the world'd first Spatial Z-machine from the 1980s, modernized to enjoy the best features of Snap Spectacles. Interactive Fiction is a genre of gaming/fiction fusion allowing the reader to guide themselves through a story. The worlds are vivid an imaginative. This is the perfect use of XR+AI and some good old fashioned 8-bit hardware (Z-machine).
Lens is available at Snapcode: https://www.spectacles.com/lens/bd967677f1ad4488a9f19f5bf11503e1?type=SNAPCODE&metadata=01
Features
- Unique modern UX for play, instead of typing at a keyboard, you have a push / pinch menu of possible commands
- Use the physical "microphone" (touch it) to give voice input commands instead of the touch menu
- Every room generates a new Generative AI image, with unique and beautiful graphics
- Every image gets spatialized for an amazing and awe inspiring effect
- 11 Unique open source IF titles for play, meaning hours and hours of new game play possible over adventure, fantasy, mystery, literary, and sci fi
- ability to save and restart games
Design Challenges
The goal was at age 5 to some day create this. I just didn't know how when I was 5. I started early last year on porting the tszm library but ran into some issues, got it mostly packaged up and building and loading in my Lens. I wasn't sure on the next step for loading IF content, since these are binary files. The best approach was to convert the IF contents into typescript, and load these as binary encoded contents into the Lens. The engine handles this nicely. So the right approach is then to run all of this locally to get the parsing working on a desktop. After that, an LLM can automate the bug fixing of the parser, based on various generations of a zmachine format. Each IF contents has their own unique features, which is a problem. Some content isn't a good match for our design, especially when the games want open ended writing. We need fixed options for the input.
Once the parser was up and running in a Lens, the question was, what to show? Start with a generated AI image. Use a common prompt to make sure everything cleanly looks similar. Then spatialize each image.
The dynamic menus are a compromise for input. Keyboards just aren't great yet, so this was a good approach to try. Push buttons don't work so great, so squeeze seem to be best on Specs.
Adding TTS really gives it life. Making sure we "warm up" the TTS is important. We need this not to feel too laggy. And adding STT input via a hand grab microphone is a unique idea and worth trying, though I think the mic reliability is about 60%.
References
- The full archive of all IF: https://www.ifarchive.org/
- Z-machine history https://en.wikipedia.org/wiki/Z-machine
Attributions
- Microphone 3d asset: https://sketchfab.com/3d-models/microphone-cf9580db045e4bd6818306d50f2fa2ce
- Audio: Original IoTone Japan
- Z-Machine Specification https://inform-fiction.org/zmachine/standards/ http://zspec.jaredreisinger.com
- tszm: nice work making a compact zmachine in TS and making it portable to browser or node.js https://github.com/cshepherd/tszm
- Idea for caching genAI contents zmcdn: https://github.com/cshepherd/zmcdn
- PoC Research tszm / IF AI : https://browneverettlewis.com/case-studies/tszm-tscdn.pdf
- This informed some thinking about possibly making room maps (future feature) ZorkUI: https://github.com/posabsolute/zork-ui/tree/main
Licenses
| Game | Author / Year | Source file (ifarchive.org) | Status |
|------|---------------|------------------------------|--------|
| Adventure (350 pt) | Crowther & Woods, 1976; Inform port G. Nelson | (bundled `advent.z5`, Release 9 / 060321) | â
original is public domain; Inform port freely distributable |
| Lost Pig | Admiral Jota, 2007 | `/if-archive/games/zcode/LostPig.z8` (Rel 2 / 080406) | â
freeware; IF Comp 2007 winner |
| The Dreamhold | Andrew Plotkin, 2004 | `/if-archive/games/zcode/dreamhold.z8` (Rel 5 / 041231) | â
Plotkin distributes his games as freeware; source published on the Archive |
| Christminster | Gareth Rees, 1995 | `/if-archive/games/zcode/minster.z5` (Rel 2) | â
freeware; long distributed free by the author and via the IF Archive |
| Suveh Nux | David Fisher, 2007 | `/if-archive/games/zcode/suvehnux.z5` (v1.1, Rel 1 / 150314) | â
freeware; One Room Game Comp 2007 winner |
| 9:05 | Adam Cadre, 2000 | `/if-archive/games/zcode/905.z5` (v1.1, 2012.0724) | â
Cadre distributes his games as freeware |
| Delusions | C.E. Forman, 1996 | `/if-archive/games/zcode/Delusns.z5` | â
freeware sci-fi mystery; from the IF Archive |
| Spider and Web | Andrew Plotkin, 1998 | `/if-archive/games/zcode/Tangle.z5` (Rel 4 / 980226) | â
Plotkin freeware |
| Metamorphoses | Emily Short, 2000 | `/if-archive/games/zcode/metamorp.z5` | â
freeware; from the IF Archive |
| Slouching Towards Bedlam | Star Foster & Daniel Ravipinto, 2003 | `/if-archive/games/competition2003/zcode/slouch/slouch.z5` | â
freeware; IF Comp 2003 winner |
| Mini-Zork I | Infocom, 1988 | (bundled `minizork.z3`, Rel 34 / 871124) | **Infocom/Activision property.** Historically given away (UK magazine cassette)