A modern Flutter-based engine for creating visual novels with support for dialogues, choices, backgrounds, and audio.
- Interactive Dialogues - Support for character dialogues
- Choice System - Multiple story branching paths
- Background Switching - Dynamic background image changes
- Audio System - Background music and sound effects
- YAML Scripts - Simple and readable script format
- Modern UI - Beautiful and responsive interface
- Cross-platform - Works on all Flutter platforms
- Flutter SDK 3.6.2 or higher
- Dart 3.0 or higher
- Clone the repository:
git clone https://github.com/nomad-pixel/visual_novel_flutter.git
cd visual_novel_flutter- Install dependencies:
flutter pub get- Run the application:
flutter runlib/
โโโ main.dart # Application entry point
โโโ constants/ # Constants and configuration
โ โโโ app_colors.dart # Color palette
โ โโโ app_constants.dart # General constants
โโโ models/ # Data models
โ โโโ game_state.dart # Game state
โ โโโ script_nodes.dart # Script nodes
โโโ services/ # Business logic
โ โโโ audio_manager.dart # Audio management
โ โโโ script_engine.dart # Script engine
โ โโโ script_loader.dart # Script loading
โโโ screens/ # Application screens
โ โโโ novel_screen.dart # Main novel screen
โโโ ui/widgets/ # UI components
โ โโโ background_widget.dart # Background widget
โ โโโ choice_box.dart # Choice box
โ โโโ dialogue_box.dart # Dialogue box
โ โโโ end_screen.dart # End screen
โ โโโ error_screen.dart # Error screen
โ โโโ loading_screen.dart # Loading screen
โโโ utils/ # Utilities
โโโ decorations.dart # Decorations and styles
Scripts are written in YAML format. Example:
label: intro
nodes:
- bg: "bg/room_morning.png"
- music: "audio/soft_morning.mp3"
- say: { who: "Aki", text: "The alarm didn't ring. Strange." }
- choice:
text: "What to do?"
options:
- { text: "Go outside", jump: "street" }
- { text: "Look out the window", jump: "window" }
---
label: street
nodes:
- bg: "bg/street_empty.jpg"
- say: { who: "Aki", text: "Empty storefronts, hot air shimmers." }
- end: truebg- Background changemusic- Play musicsay- Character dialoguechoice- Player choicejump- Jump to another sceneend- End the story
Modify colors in lib/constants/app_colors.dart:
class AppColors {
static const Color primaryBlue = Colors.blue;
static const Color backgroundDark = Color(0xFF1a1a2e);
// ... other colors
}Configure parameters in lib/constants/app_constants.dart:
class AppConstants {
static const String appTitle = 'Visual Novel';
static const String defaultScriptPath = 'assets/scripts/prologue.yaml';
// ... other constants
}- โ Android
- โ iOS
- โ Web
- โ Windows
- โ macOS
- โ Linux
# Android
flutter build apk --release
# iOS
flutter build ios --release
# Web
flutter build web --releaseflutter- Main frameworkyaml- YAML file parsingaudioplayers- Audio playback
- 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.
Your Name
- GitHub: @nomad-pixel
- Flutter team for the excellent framework
- Developer community for inspiration
- All project contributors
โญ If you liked this project, give it a star!