Simple Visual Novel Engine
A minimal TypeScript visual novel engine with vanilla DOM rendering. Supports dialogue with text effects, character management, scene transitions, and game state management.
import { Script, Scene, Character, VNEngine } from "simple-visual-novel";// Create a script with scenesconst script = new Script();// Create charactersconst narrator = new Character("Narrator");const alice = new Character("Alice", "alice.png");// Build a sceneconst scene1 = new Scene("intro", { background: "park.png" });scene1.add(narrator);scene1.add(alice, { position: "center" });narrator.say("It was a beautiful day.", { effect: "fade" });alice.say("Hello!", { effect: "typewriter" });script.addScene(scene1);// Initialize and runconst engine = new VNEngine({ script, container: "#game", startScene: "intro", renderer: { assetsDirectory: "assets" }}); Copy
import { Script, Scene, Character, VNEngine } from "simple-visual-novel";// Create a script with scenesconst script = new Script();// Create charactersconst narrator = new Character("Narrator");const alice = new Character("Alice", "alice.png");// Build a sceneconst scene1 = new Scene("intro", { background: "park.png" });scene1.add(narrator);scene1.add(alice, { position: "center" });narrator.say("It was a beautiful day.", { effect: "fade" });alice.say("Hello!", { effect: "typewriter" });script.addScene(scene1);// Initialize and runconst engine = new VNEngine({ script, container: "#game", startScene: "intro", renderer: { assetsDirectory: "assets" }});
Simple Visual Novel Engine
A minimal TypeScript visual novel engine with vanilla DOM rendering. Supports dialogue with text effects, character management, scene transitions, and game state management.
Example