1.5 KiB
1.5 KiB
Visual Novel Dating Sim Editor
A web-based editor for creating and previewing Visual Novel scripts with real-time feedback.
🏗 Architecture
- Frontend: Next.js (TypeScript) + Tailwind CSS.
- State Management: React
useStateanduseEffectinapp/page.tsx. - Script Engine: Custom regex-based parser in
lib/vn-parser.ts. - Renderer: Dynamic React component in
components/VNPreview.tsxthat reconstructs the scene state. - Persistence:
- Automatic
localStoragesync for current session. - Script export/import as
.vnsfiles. - Inline Base64 image embedding for portable project files.
- Automatic
📝 Script Syntax
Basic Commands
say Character "Dialogue": Display dialogue for a character.say "Dialogue": Narrator text.sprite Char Emotion at Position: Place a character on screen.- Positions:
pos1topos8.
- Positions:
wait 2s: Pause for duration (can addskippable).label Name: Define a jump point.choice "Text" jump:Label: Create a branching choice.define_sprite Char ID "URL": Register a sprite asset.
Rich Text Modifiers
b"Bold"i"Italic"u"Underline"c"Red"(c:red)w"Wait"(w:1s)
🚀 Production Deployment
Docker (Recommended)
The project is optimized for Docker using Next.js standalone output.
# Build the image
docker build -t vn-editor .
# Run the container
docker run -p 3000:3000 vn-editor
Manual Build
npm install
npm run build
npm run start