whisker is a powerful, flexible interactive fiction engine written in Lua. Create text-based games, visual novels, and branching narratives with an easy-to-use scripting system - inspired by Twine, but built with Lua's power and flexibility.
Whisker is a complete interactive fiction engine that allows you to create choice-based stories, text adventures, and narrative games. Whether you're a writer wanting to create branching stories, a game developer prototyping dialogue systems, or an educator building interactive learning materials, whisker provides the tools you need.
- 🎮 Full-Featured Engine - Complete story system with passages, choices, and variables
- 📝 Lua Scripting - Powerful scripting for complex game mechanics and logic
- 🔄 Twine Compatible - Import and export stories from Twine (Harlowe, SugarCube, Chapbook, Snowman)
- 🌐 Multi-Platform - Run on console, web browsers, and desktop
- 💾 Save System - Multiple save slots with autosave support
- 🐛 Development Tools - Built-in debugger, profiler, and validator
- 📱 Responsive Web UI - Beautiful HTML5 player included
- 🎨 Highly Customizable - Extensive configuration and theming options
- 📦 No Dependencies - Pure Lua implementation, batteries included
- Lua 5.1 or higher (installation instructions)
Create a file called my_story.lua:
Run it:
- Getting Started - Complete installation guide and first story tutorial
- API Reference - Detailed API documentation
- Documentation Overview - Full feature list and architecture guide
- Snowman Converter - Converting Twine Snowman stories
- Metatable Preservation - Advanced Lua features
Whisker includes several example stories to help you learn:
- simple_story.lua - A minimal cave exploration story
- tutorial_story.lua - Learn whisker features interactively
- adventure_game.lua - Full RPG with inventory, combat, and quests
- CLI Runtime - Command-line interface
- Desktop Runtime - LÖVE2D desktop application
- Web Runtime - Browser-based player
- Web Demo - Single-file web example
Run any example:
Or try the web demo by opening examples/web_demo.html in your browser!
- Passage-based narrative structure
- Dynamic choice generation
- Variable tracking and state management
- Conditional content and branching
- Script execution on passage enter/exit
- Import HTML stories from Twine
- Support for multiple formats: Harlowe, SugarCube, Chapbook, Snowman
- Convert between formats
- Export to JSON or whisker format
- Validator - Check story structure and find issues
- Debugger - Set breakpoints and inspect state
- Profiler - Measure performance and optimize
- Console - Interactive testing environment
- CLI - Terminal-based player for any platform
- Web - HTML5 player with responsive design
- Desktop - LÖVE2D integration for native apps
- Interactive Fiction - Text adventures and choice-based games
- Visual Novels - Story-driven experiences with complex branching
- Educational Tools - Interactive tutorials and learning experiences
- Game Prototyping - Rapid dialogue and narrative system prototyping
- Narrative Design - Story structure visualization and testing
Contributions are welcome! Whether it's bug fixes, new features, documentation improvements, or example stories, we'd love your help.
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs/
- Examples: examples/
- Issues: GitHub Issues
- Core story engine
- Twine format compatibility
- Multiple runtime environments
- Development tools (debugger, profiler, validator)
- Comprehensive test suite
- Visual story editor (planned)
- Mobile runtime (planned)
- Plugin system (planned)
- Cloud save integration (planned)
Start creating your interactive fiction today! 🚀
For detailed documentation and tutorials, see the docs directory, especially:
- Getting Started Guide - Your first story in 5 minutes
- API Reference - Complete API documentation
- Full Documentation - Feature overview and architecture
.png)


