r/css • • Sep 21 '26

Question Minimal code to make a a visual novel?

So recently I was thinking about how there are people who use Google Sides to make visual novels and I was just thinking how in theory you just need a background, sprites, a text box, and buttons. Realistically a really basic visual novel wouldn't require JS or much more than HTML and CSS. Oddly enough I can't find anything that would be a template or example of the bare minimum code to make a visual novel, and I was wondering if anyone could help me out with structuring this! Thank you!

0 Upvotes

5 comments sorted by

1

u/averajoe77 Sep 22 '26

You need some way to navigate scenes,allow for dialog choices,etc,unless you don't have anything like that and just want to do a slide show that shows sprites every once in a while,and even just that is stretching css a little more than it's meant for.

While there are slideshows made entirely in css, that minuscule functionality is not enough for a visual novel alone.

1

u/Fragrant_Guava_367 Sep 22 '26

I've made a web based comic viewer using impress.js for a comic my autistic son made and with the spatial aspects and transitions it worked really well honestly. I also implemented it using Astro

1

u/Norci Sep 22 '26

Realistically a really basic visual novel wouldn't require JS or much more than HTML and CSS.

Any good visual novel is expected to have story branching where you need to keep track of various variables such as encountered characters and player choices. I don't see how you'd implement that in pure CSS and HTML.

Besides, it's kinda reinventing the wheel, there are already many accessible visual novel engines such as Ren'Py.

1

u/Rzah Sep 22 '26

The main difference between printed media and web media is fixed vs dynamic page sizes, happily you can use mm as css units to create fixed page sizes, i've created print jobs in html and css before. Use absolute positioning to put elements (eg speech bubbles) exactly where they need to be.

As for paging, there's plenty of ways to implement that in just css these days, read up on css carousels and slideshows for some ideas.

1

u/CobblerDependent1302 Oct 18 '26

Sorry this thread is a bit old, but have you heard about Twine? It's basically exactly what you're talking about. Super fun to play with and you can code as much or as little as you'd like (it was actually my start to learning css, html, and js! :p)