How to make a visual novel
To make a visual novel, connect a short script to dialogue, choices and endings, add character art, then play every route.
The Last Beacon
You
The tide has swallowed the road. Only the lighthouse window still carries a light.
7dialogue nodes
1branching choice
2distinct endings
1. Write one scene and one decision
You choose what the player must decide. The Last Beacon puts you beside a lighthouse during a storm. Mara has spotted a boat beyond the reef. You can light the beacon to guide it home or ring the bell to warn the village. Each action changes the final scene. That is the complete scope: one place, two speakers and one decision with two outcomes.
Write the ending lines before the introduction. If the two endings say effectively the same thing, change the choice. A useful first scene lets you test the whole game without writing a chapter. The Ren'Py quickstart teaches dialogue, images, menus and branching through its own small game. Follow that route if you want its built-in visual-novel tools.
2. Keep the script separate
You give every dialogue node a stable id. Each node has a speaker, text and scene. A normal node points to its next node. A choice lists labels and destinations. An ending has no next node. This is the actual choice in the playable example:
{
"speaker": "Mara",
"text": "The storm is here. Which signal do we send?",
"scene": "shore",
"choices": [
{
"label": "Light the beacon",
"to": "signal"
},
{
"label": "Ring the bell",
"to": "bell"
}
]
}Download the complete story JSON and rename the speakers or rewrite a line. Keep the ids until the new route works. That way a saved position still refers to a real scene. When you add a branch, add its destination node before you attach a button to it.
The graph below is the actual route structure, with every step named. It has no hidden affection score. To add one later, store the variable with the current node and make the ending condition explicit. Inkle's web tutorial shows a richer branching-writing workflow and how to export it for the web.
3. Add art around the dialogue
You make the words readable before adding effects. This scene uses one original SVG of Mara and the harbor. A dark dialogue area keeps the line readable over both the sky and the water. The beacon ending brightens the scene; the village ending changes its color. The player advances at their own pace, with no timer and no automatic text advance.
Start with placeholder art you have permission to use, then replace it when the route works. Keep a character's position and scale stable between expressions. Check the picture on a phone before making more poses. The game needs an obvious speaker, enough space for a complete line and choice buttons that do not cover the words.
4. Build it with Claude Code
You ask for observable behavior. Put the downloaded HTML and story JSON into a project folder, open Claude Code there and paste this prompt. It names the working example, the state and the tests. It does not ask for an entire long novel in one turn.
Build a browser visual novel called The Last Beacon from s15-story.json and the downloaded HTML example. Keep the story text in JSON. Show a lighthouse background and Mara's portrait, a named speaker, one dialogue line and Continue. At the choice node show exactly two buttons; each must lead to its own ending. Add Save, Load and Restart with browser storage errors shown as text. Make every action usable with Tab and Enter and at 414 px wide. Test all seven nodes and both endings, save at the choice then load after an ending, and ensure Restart clears the active route. Keep the game runnable offline as one HTML file. Do not add live model calls.Keep one change per pass: first the script, then the dialogue controls, then the art. Run the game after each change. The downloadable example here is the implementation used for this guide, with its own original story; the prompt is an instruction for adapting it in your project. The game skills guide explains how to make a repeated check part of your Claude Code workflow.
5. Test, save and share
You play both routes from a clean start. Advance twice, choose the beacon and continue to the boat ending. Restart, reach the choice again, choose the bell and continue to the village ending. Save at the choice, finish one branch, then load and choose the other. Restart returns to Arrival; it leaves the saved slot available until you overwrite it.
Use Tab and Enter for every control and repeat at phone width. Download the standalone HTML to keep the game as one file with its story and art inside. It opens offline. Saved progress belongs to the browser and origin where you played; the downloaded copy has its own storage context. For a larger game with inventory or movement around conversations, start from the kit's game starters and connect the dialogue graph to that game's state. See the kit.
Questions
How do I make a visual novel?
Write a short scene, give the player one meaningful choice, connect each choice to its own ending, then add a background, a character and dialogue controls. Play every branch before expanding the story. The Last Beacon on this page demonstrates those parts in seven dialogue nodes.
Can Claude Code make a visual novel?
Claude Code can write the dialogue player, connect story data to choices and add save, load and restart controls. Give it the story graph and explicit tests for every ending. Keep the script in a separate file so you can revise a line without changing the player.
Which engine should I use for a visual novel?
Use Ren'Py when the main job is a longer visual novel with dialogue, menus and saved progress. Ink suits branching text that will connect to a larger game. A small HTML player like this example lets you learn the route logic and share one browser file.
How do I test branching dialogue?
Walk from the starting node through each choice and record the ending reached. Check that every referenced node exists, that a choice does not immediately return to itself, and that restart returns to the opening. Save at the choice, take one route, load, and take the other.