A Classic Adventure Reimagined with AI
VibeZork offers a fun new way to play the beloved classic Zork. I've taken the popular 80s text-based adventure and transformed the experience with the power of AI-generated graphics and music. This project lets you play the old classic via Frotz, now augmented with immersive visuals and dynamic audio that truly bring its world to life.
This idea kicked off during the VIBE CODING SUMMIT at the AGI House in the Bay Area. For me, it's a nostalgic bridge straight back to my childhood, recalling countless hours spent immersed in text-based adventures and imagining the world I was in. Now, with the super powers of AI, the players can visualize many of those iconic scenarios and listen to music that tries to match the game's mood.
It's been an incredibly fun experience connecting the "prompts" of the 80s (where my imagination filled in all the blanks) with the powerful prompting capabilities of today's AI. I had a lot of fun building this, and I truly hope you enjoy playing it as much as I enjoyed creating it!
HeyHo!?
- Desktop App - Electron based desktop app and UI.
- Classic Gameplay - Full integration with the original Zork game via Frotz.
- AI Graphics - Real-time scene visualization in different styles.
- AI Music - Atmospheric music generation for each game location.
- AI Autoplay - Watch AI play through the game automatically.
- Multiple Graphics Styles - Choose from pixel art, realistic and more.
This instruction are for macOS, but it should be easy to adapt to other systems.
- Node.js (v16 or higher).
- npm (comes with Node.js).
- frotz - Z-machine interpreter for playing Zork.
Caution
The app has no usage limits. Be aware that AI API requests will consume your quotas and credits, especially when using the AI auto-play feature.
macOS (using Homebrew):
brew install frotzMore info at David Kinder's website.
You'll need the Zork I game file zork1_sg.z5.
Find it here: https://datadrivengamer.blogspot.com/2019/04/game-55-zork-i.html
Place the game file at ~/Downloads/zorkpack/zork1_sg.z5.
The app expects this exact location.
But this is easy to change if you want to.
gh repo clone mlemos/vibezork
cd vibezorkOr
git clone https://github.com/mlemos/vibezork.git
cd vibezorknpm installSet up your API keys in the in the following environment variables:
# Required for AI features
REPLICATE_API_KEY=your_replicate_api_key_here
OPENAI_API_KEY=your_openai_api_key_herenpm run devThis command starts:
- Backend server on port 3001 (Express + WebSocket).
- Webpack dev server on port 8080 (React frontend).
- Electron app window.
# Terminal 1: Backend only
npm run backend
# Terminal 2: Frontend only
npm run webpack:dev
# Terminal 3: Electron only (after frontend is ready)
npm run electron:dev- Click on the Re(Start) Game button to start or restart the game.
- Type commands in the input field at the bottom of the main panel.
- Press Enter or click Send to execute commands.
- Common commands:
look- Examine your surroundingsinventory- Check what you're carryingnorth,south,east,west- Move in directionstake lamp- Pick up objectsopen mailbox- Interact with objects
Caution
The app has no usage limits. Be aware that AI API requests will consume your quotas and credits, especially when using the AI auto-play feature.
- Click Start AI to let AI play automatically.
- Adjust autoplay speed with the slider.
- The AI will play continuously at the speed you set.
- Input is disabled during autoplay mode.
- Click Pause AI to pause the AI.
- Click AI Move to let AI play one move.
- Re(Start) Game - Start or restart Zork from the beginning.
- Start AI - Toggle automatic AI gameplay.
- Pause AI - Pause the AI.
- AI Move - Request one AI move.
- Mute/Unmute - Control background music.
- Graphics Mode - Select visual style for image generation.
- Autoplay Speed - Adjust timing between AI moves.
Monitor real-time status:
- Backend - Connection to game server.
- AI - AI thinking/ready status.
- Auto - Manual/autoplay mode.
- Audio - Sound on/off.
- GFX - Current graphics mode.
- View AI thoughts and decision-making process.
- See image/music generation progress.
- See the prompts used on image and music generation.
- Error messages.
"Backend not connected"
- Ensure dfrotz is installed and in PATH.
- Check that Zork game file exists at specified path.
- Verify port 3001 is available.
"No API token" warnings
- Add REPLICATE_API_KEY and OPENAI_API_KEY to your environment variables.
- Restart the application after adding keys.
Images/Music not generating
- Verify API keys are valid and have credits.
- Check network connection.
- View browser console for detailed error messages.
Game not responding
- Try the Reset Game button.
- Check that dfrotz process is running:
ps aux | grep dfrotz. - Restart the application.
Check generated logs for debugging:
image-log.txt- Image generation history.music-log.txt- Music generation history.
src/
├── backend/ # Node.js server
│ ├── server.js # Main server with WebSocket
│ ├── gameEngine.js # Frotz integration
│ ├── imageService.js # AI image generation
│ ├── musicService.js # AI music generation
│ └── aiPlayerService.js # AI playing
├── electron/ # Electron main process
│ ├── main.js # Window management
│ └── preload.js # Security layer
└── renderer/ # React frontend
├── components/ # UI components
├── services/ # API clients
└── styles/ # CSS styling
This project is licensed under the MIT License – see the LICENSE file for details.
This project is for educational and entertainment purposes. Zork is a trademark of Activision.
- Original Zork - Infocom (1980) and the authors of the original game (Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling).
- Game File - Dowload from Data Driven Gamer.
- Frotz - Z-machine interpreter by David Kinder.
- Image Model - Flux-Schnell via Replicate.
- Music Model - MusicGen via Replicate.
- Playing Model - GPT-4.1 by OpenAI.
- Framework - Electron, React and Node.js.
- Coding Assistant - Claude Code by Anthropic.
Special thanks to Lukas Nel and Philippe Mallette for their support, hints and great company during the hackathon!
