All projects

Wordcraft Valley

A phonics adventure game for the iPad that works offline, made so one child would enjoy learning to read.

Status
Live
Year
2026
Kind
personal project
Built with
  • JavaScript
  • HTML and CSS
  • Service Worker
  • IndexedDB
  • Web Audio
  • Node.js
  • Python
  • Docker
  • Playwright
  • jsdom
  • GitHub Actions
  • Cloudflare Workers

What it is

Wordcraft Valley is a learning game I developed for my child, so he would have fun while learning to read and other skills.

It is a phonics adventure. The player reads words to open crates, and what the crates pay goes into building up a valley. Around that are decodable storybooks, a gem mine, races and pets. It is an offline web app that installs to an iPad's home screen.

How it's built

There is no framework and no build step. The game's code is one HTML file with its styles and script inline, about 1.4 MB and 19,000 lines in October 2026, and its art and reading content load from plain data files beside it.

A service worker keeps the page and every data file in one versioned cache and replaces the whole set on each release, so the page and its data always come from the same build. Progress is saved on the device in IndexedDB.

About 3,100 spoken lines were recorded ahead of time with an open-source voice model: roughly 29 MB of audio, in a cache of its own so a new release does not download it again. Letter sounds come from a Web Audio synthesizer, because a device's voice reads a stretched "sss" as the letter's name.

On a local network, a Node server with no dependencies serves the game and keeps backups.

Worth noting

  • Reading is tracked by sound, not by score. A word climbs three steps: find its picture, build it from sound tiles, read it with no picture. Every answer is traced to the sound patterns in the word, 31 in all. When a wrong answer differs from the right one by a single sound, the mistake is pinned to that sound, and later practice aims at the weakest pattern.
  • Storybook text is checked by a script. Every word in a book must use only the sounds taught up to that book's level, or be one of that level's listed tricky words.
  • Tests gate every release. jsdom and Playwright suites run on every push, and a release deploys only after they pass. Some tap every control on the main screens (the crate loop, the valley, the jobs and the reading modes) at a touch iPad's size, and double-tap every button that pays a reward.
  • Changes are measured. Moving art and content out of the page cut it from about 2.3 MB to 1.1 MB; later features have brought it back to 1.4 MB. By the project's own measurements, battery work cut layout passes on the idle valley from about 31 a second to 18, and to none once the valley rests.