Skip to content

๐ŸŽฎ Create captivating visual novels with this modern Flutter engine. Supports dialogues, choices, backgrounds, music, and YAML scripting

License

Notifications You must be signed in to change notification settings

nomad-pixel/visual_novel_flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Visual Novel Engine

A modern Flutter-based engine for creating visual novels with support for dialogues, choices, backgrounds, and audio.

๐ŸŽฎ Features

  • 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

๐Ÿš€ Quick Start

Requirements

  • Flutter SDK 3.6.2 or higher
  • Dart 3.0 or higher

Installation

  1. Clone the repository:
git clone https://github.com/nomad-pixel/visual_novel_flutter.git
cd visual_novel_flutter
  1. Install dependencies:
flutter pub get
  1. Run the application:
flutter run

๐Ÿ“ Project Structure

lib/
โ”œโ”€โ”€ 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

๐Ÿ“ Creating Scripts

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: true

Supported Nodes

  • bg - Background change
  • music - Play music
  • say - Character dialogue
  • choice - Player choice
  • jump - Jump to another scene
  • end - End the story

๐ŸŽจ Customization

Colors

Modify colors in lib/constants/app_colors.dart:

class AppColors {
  static const Color primaryBlue = Colors.blue;
  static const Color backgroundDark = Color(0xFF1a1a2e);
  // ... other colors
}

Constants

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
}

๐Ÿ“ฑ Supported Platforms

  • โœ… Android
  • โœ… iOS
  • โœ… Web
  • โœ… Windows
  • โœ… macOS
  • โœ… Linux

๐Ÿ›  Development

Building for Release

# Android
flutter build apk --release

# iOS
flutter build ios --release

# Web
flutter build web --release

๐Ÿ“ฆ Dependencies

  • flutter - Main framework
  • yaml - YAML file parsing
  • audioplayers - Audio playback

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

Your Name

๐Ÿ™ Acknowledgments

  • Flutter team for the excellent framework
  • Developer community for inspiration
  • All project contributors

โญ If you liked this project, give it a star!

About

๐ŸŽฎ Create captivating visual novels with this modern Flutter engine. Supports dialogues, choices, backgrounds, music, and YAML scripting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published