npdart library
A minimal game engine for creating visual novels.
Classes
- Character
- An abstract character of the novel.
- Choice
- An option which the user can pick when prompted. The label is a text displayed to the user. The callback is called once the option is selected.
- DialogOptionEvent
- An event that is emitted when the user picks an option. Contains the result of its callback.
- Novel
- An entry point of the visual novel.
- NovelInputEvent
- Parent class for events, that may be emitted after some user input.
- NovelTextTheme
- A wrapper for the TextTheme, covering all the apis, necessary to the novel.
- Preferences
- A class that contains most of the key values, which define the game behavior.
- RequestNextEvent
- An event that is emitted when there are no choices and the user taps the screen.
- SaveData
- A snapshot of a state of the game, which can be used to load the state anew.
- Scene
- A core element of a global state of the game.
- Stage
- The local state of the novel.
- Tree
- A class that holds all the scenes and provides methods for accessing them.
- Verse
- A phrase that can be printed to the textbox of a scene.
Functions
-
autosave(
SaveData saveData, String savePath) → Future< void> - Creates a save and writes it to the unique file.
-
getDefaultInitialSaveData(
Preferences preferences) → Future< SaveData> - Returns the most recent save is case if one exists. Otherwise returns a clear state defined by SaveData.fallback;
-
getVisitedScenes(
String savePath) → Future< Set< String> > -
listSaves(
String savePath) → Future< List< SaveData> > -
markSceneAsVisited(
String sceneId, String savePath) → Future< void> -
save(
SaveData saveData, String savePath) → Future< void>