Inky
Visual Novel Engine
A Ren'Py-inspired Visual Novel Engine built with TypeScript and React, featuring its own scripting language InkyScript for interactive stories.
Tech Stack
Inky is a complete Visual Novel/Narrative Engine for the web, inspired by Ren'Py. Built in an afternoon as a learning project, it features its own scripting language InkyScript (.inky files) for writing interactive stories with choices, variables, and conditions.
⨠Key Features
Labels & Jumps
Story sections and navigation for organizing your narrative structure.
Dialogues
Character conversations with smooth typewriter effects for immersion.
Choices
Player decisions with branching paths that shape the story.
Variables
Dynamic story state management for complex narratives.
Conditions
If/else logic for branching narratives based on player choices.
Commands
Scene management, character sprites, and audio control.
Character System
Character definitions with sprites and custom colors.
Sprite System
Dynamic character expressions with placeholder support.
š InkyScript Syntax
InkyScript is a custom DSL designed specifically for visual novels:
// Character Definitions
@char MC
name: "Player"
sprite: "Player.png"
color: "#4A90E2"
@char Sayori
name: "Sayori"
sprite: "sayori/{expression}.png"
color: "#FF69B4"
// Story Start
== Start ==
scene school_hallway
~ affection = 0
Narrator "Welcome to Inky!"
Sayori "Hi! How are you?"
* Say something nice -> NicePath
* [affection > 5] Be romantic -> RomancePath
* Ignore her -> IgnorePath
== NicePath ==
~ affection += 10
show sayori happy at center
Sayori "That's so sweet!"
{ affection >= 10 }
Sayori "I really like you!"
-> GoodEndingšļø Architecture
Lexer (Tokenizer)
Converts .inky script text into tokens (Label, Dialogue, Choice, etc)
Parser (AST Builder)
Converts tokens into an Abstract Syntax Tree (AST) for execution
StepInterpreter (Runtime)
Executes AST step-by-step for UI integration with state management
InkyPlayer (React UI)
Renders the visual novel with scenes, characters, and dialogue boxes
āļø Engine Components
š Documentation
InkyScript Documentation
Complete language documentation with syntax and examples
Getting Started Guide
Learn InkyScript in 10 minutes with hands-on examples
Character System
Character definition and sprite system documentation
Project Structure
Codebase architecture and organization guide
š Project Structure
Inky/ āāā public/ ā āāā inks/ # InkyScript files ā ā āāā demo-school-day.inky ā āāā assets/ ā āāā backgrounds/ # Scene backgrounds ā āāā characters/ # Character sprites āāā src/ ā āāā core/ ā ā āāā inkyscript/ ā ā ā āāā Lexer.ts # Tokenizer ā ā ā āāā Parser.ts # AST Generator ā ā ā āāā StepInterpreter.ts ā ā ā āāā Runtime.ts # State management ā ā ā āāā types.ts # Type definitions ā ā āāā UI/ ā ā āāā InkyPlayer.tsx ā ā āāā DialogueBox.tsx ā ā āāā ChoiceBox.tsx ā ā āāā Character.tsx ā āāā main.tsx # React entry point
šÆ Current Status
ā Completed Features
- āInkyScript DSL specification
- āLexer & Parser - Complete AST generation
- āStepInterpreter - Step-by-step execution
- āCharacter & Sprite System
- āReact UI - Complete visual novel player
- āScene & Dialogue System
- āChoice System - Interactive branching
- āConditional Logic - Dynamic story flow
š§ Potential Improvements
- āSave/Load System
- āRollback/History
- āTransitions & Animations
- āAudio System
- āDev Tools (Debugger, Script Editor)
š® Inspiration
Inspired by industry-leading visual novel tools:
š§ Built With
"A personal learning project built in an afternoon. Made with ā¤ļø for visual novel enthusiasts!"