A single HTML file that procedurally generates a living medieval kingdom with economy, dynasties, events, and an auto-narrating chronicle, all deterministic from a shared seed.

Stars

48

7-day growth

No data

Forks

14

Open issues

1

License

MIT

Last updated

2026-07-08

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It combines deep procedural generation, interactive simulation, and deterministic seed-based sharing into one self-contained HTML file with no build step or backend.

Who it is for

  • Game developers exploring procedural generation
  • History and simulation enthusiasts
  • Web developers interested in single-file applications
  • Casual users who enjoy ambient world-watching

Use cases

  • Educational tool to observe medieval economic and social dynamics
  • Inspiration for game world design or narrative generation
  • Relaxing ambient viewing with auto-director mode
  • Sharing unique worlds via seed links

Strengths

  • Deterministic seed ensures identical worlds from a URL hash
  • Wealth of interwoven systems (economy, dynasties, weather, events) in ~7,000 lines
  • Runs smoothly with under 100 draw calls at 60 fps
  • Fully interactive with touch and keyboard controls

Considerations

  • Single-file design may resist modular modification
  • No save/load functionality beyond sharing the seed
  • Requires a browser with WebGL and an internet connection for the three.js CDN

README quick start

The Annals — a living kingdom in a single file

A procedurally generated medieval realm that lives on its own — harvests and plagues, dynasties and civil wars, bandits, omens, and a dragon asleep on its hoard — while its chronicle writes itself in the margin. Watch it like a nature documentary, or reach in and turn the dials of fate.

Play it: annals-kingdom.netlify.app

Everything is one HTML file. No build step, no backend, no saves — the entire kingdom regenerates deterministically from a seed in the URL hash, so a link is a world: share #s=your-seed-here and the recipient forges the exact same realm, down to the last shepherd.

What lives in it

  • A forged world — terrain, rivers that carve valleys and end in meres, biomes, roads found by pathfinding, towns planned street by street, heraldry drawn house by house
  • A working economy — seven goods, prices from scarcity, caravans and cargo cogs you can follow down the roads, tolls, famines, and the occasional beached whale
  • A dynasty — named notables who marry, scheme, and die; successions, regencies, usurpers, family trees you can browse; great houses with temperaments, grudges, and civil wars fought by armies that camp outside the walls
  • The fates — weather and floods, fires with real flames, plague waves, bandit kings, comets and eclipses, wolf-winters, white harts, and one dragon
  • Towns that change — houses rise with prosperity and rot with decline, forests are cleared into farmland, new villages are chartered, windmills and abbeys and wayside shrines appear over the decades
  • An auto-director and Watch mode — leave it alone and a camera drifts to whatever story is breaking, with a caption card; press C and the realm narrates itself
  • The Chronicle — every event inked with its date, filterable, exportable, with a Charts view of population, treasury, and prosperity across the centuries
  • Acts of God — a board of interventions: plague, fire, earthquake, dragon-waking, assassination, contested successions, or the charter of a new village exactly where you click

Controls

DesktopTouch
drag to orbitone finger orbits
wheel / trackpad scroll or pinch to zoompinch zooms
right-drag to pantwo fingers pan
double-click to traveldouble-tap travels
click to inspecttap inspect

Description

A living medieval kingdom in a single HTML file - procedural worldgen, economy, dynasties, wars, dragons, and a chronicle that writes itself

Related repositories

Similar projects matched by category, topics, and programming language.

ddosi
Featured
ddosi GitHub avatar

PacketLens

PacketLens is a pure front-end, offline pcap analysis tool that runs entirely in the browser, supporting deep protocol decoding, HTTPS decryption, and million-packet instant loading without any backend.

HTML
17
ViffyGwaanl
Featured
ViffyGwaanl GitHub avatar

kimi-k3-learn

An interactive learning system that turns the 47-page Kimi K3 technical report into a single offline HTML file with running algorithms, 3D visualizations, spaced repetition quizzes, and a smart highlighting QA tool.

AI & Machine Learning
15
iamtechartist
Featured
iamtechartist GitHub avatar

human-cell-visualizer

An interactive 3D visualization of three human cell types using Three.js, WebGL particles, and custom GLSL shaders, allowing users to rotate, zoom, morph, and explore annotated structures.

Design & Creative
13