FableFlow Engine
The core engine for FableFlow visual novels. This package provides the fundamental building blocks for creating interactive visual novel experiences in Flutter.
Features
- π Scene Management: Support for multiple scene types including regular scenes, cutscenes, and ending scenes
- π¬ Dialog System: Character-based dialog system with customizable text and name styles
- π Character System: Support for character sprites with positioning (left, right, center) and states
- π Branching Logic: Conditional branching with variable support
- π΅ Audio Support: Background music and sound effects with multiple audio sources (network, local, assets)
- πΎ Save/Load System: Multiple save slots with scene and variable persistence
- π¨ Customization: Customizable dialog boxes, text styles, and UI elements
- πΌοΈ Asset Loading: Support for network images, local files, and bundled assets
Getting Started
Add this package to your pubspec.yaml:
dependencies:
fable_flow_engine: ^0.1.0
Usage
Basic Scene Display
import 'package:fable_flow_engine/models/scene.dart';
import 'package:fable_flow_engine/widget/scene_widget.dart';
SceneWidget(
scene: Scene(
id: 'scene_1',
image: 'https://example.com/background.png',
behaviors: [
Behavior(
character: Character(
id: 'char_1',
name: 'Alice',
color: Colors.blue,
),
dialog: 'Hello, world!',
position: Position.left,
),
],
),
variables: {},
onComplete: () {
// Handle scene completion
},
)
Loading from JSON
import 'package:fable_flow_engine/models/Interlude.dart';
import 'package:fable_flow_engine/widget/future_interlude_widget.dart';
FutureInterludeWidget(
path: 'assets/story.json',
onComplete: () {
// Story completed
},
)
Customizing Dialog Appearance
SceneWidget(
scene: myScene,
variables: {},
onComplete: () {},
dialogBoxDecoration: BoxDecoration(
color: Colors.black.withOpacity(0.8),
borderRadius: BorderRadius.circular(10),
),
characterNameStyle: TextStyle(
color: Colors.yellow,
fontSize: 20,
fontWeight: FontWeight.bold,
),
dialogTextStyle: TextStyle(
color: Colors.white,
fontSize: 16,
),
)
Models
Scene
Represents a game scene with background, behaviors, and optional branching.
Behavior
Defines character actions including dialog, position, and state.
Character
Character definition with ID, name, and visual properties.
Branch
Conditional branching with variable modifications.
Interlude
A complete story with multiple scenes and global variables.
Additional Information
- Homepage: https://peegel.xyz
- Repository: https://gitlab.com/Simirror/fable_flow
- Issues: Please file issues on the GitLab repository
For more information on creating visual novels with FableFlow, check out the lite package for a simplified player experience.