๐ŸŽฎ Building a Browser Visual Novel

A Creative Dev Journey with HTML, CSS & JavaScript

Click here for webpage

๐Ÿš€ The Original Prompt

My prompt:
please create a simple website using html, css and javascript that looks like visual novel with a regular conversation involving 2 16 year olds

From this single sentence, we began building a mini browser-based visual novel engine. Click here for code

Initial Features:
  • Full-screen background
  • Two characters (left and right)
  • Dialogue box at the bottom
  • Click to progress
  • Active speaker highlighting

Project structure:

Other options: nil

๐ŸŽญ Upgrade 1: Real Character Portraits

We replaced placeholder blocks with real character images. Click here for code

Concepts introduced:
  • Using <img> for sprites
  • Absolute positioning
  • Opacity for speaker focus
  • Organising assets in an /images folder

This step introduced asset management โ€” a core game development skill.

โœจ Upgrade 2: Typewriter Text Effect

We enhanced immersion by adding animated dialogue text. Click here for code

Logic added:
  • Track whether text is currently typing
  • If typing โ†’ finish instantly on click
  • If finished โ†’ load next line
  • Use setTimeout for animation timing

This transformed a static webpage into a state-driven interactive system.

๐Ÿ“ฑ Upgrade 3: Mobile Responsiveness

We made the visual novel fully usable on phones and tablets. Click here for code

Key concepts:
  • Meta viewport tag
  • Responsive units (vh, vw)
  • clamp() for fluid typography
  • Media queries
  • Debugging layout scaling issues

We even fixed a portrait shrinking issue caused by responsive width constraints โ€” a real-world CSS debugging moment.

๐Ÿ”„ Systems Thinking: Flowcharting the Experience

We stepped back and mapped the logic of the experience.

User Opens Page
โ†’ Load Dialogue
โ†’ Is Text Typing?
โ†’ Branch Logic
โ†’ Loop Until End

This shifted us from โ€œmaking something workโ€ to โ€œunderstanding how it works.โ€

๐Ÿ“Š Professional Documentation with Mermaid.js

We converted the system into a proper flowchart using Mermaid.js. Click here for code

New concepts introduced:
  • Using a CDN to load libraries
  • Initialising Mermaid with configuration
  • Theme switching (dark mode)
  • Separating UI from logic

The project evolved from a simple web page into a documented interactive engine.

๐Ÿง  What This Project Actually Teaches

Front-End Development
  • HTML structure
  • CSS layout and responsiveness
  • JavaScript state management
Game Development Concepts
  • Dialogue systems
  • Input handling
  • Animation timing
  • Character state feedback
Software Engineering Skills
  • File organisation
  • Refactoring
  • Debugging
  • System documentation

๐ŸŒฑ Where It Could Go Next

๐Ÿ Final Reflection

This journey shows how a simple creative prompt can evolve into:

An interactive system โ†’ A responsive experience โ†’ A documented architecture โ†’ An educational case study

Thatโ€™s how real projects grow.