Skip to content

Timeline ​

The world's clock, its history, and how it advances over time.

World Clock ​

The world has its own internal clock, independent of real time:

ts
interface WorldTime {
  day: number;        // starts at 1
  hour: number;       // 0–23
  minute: number;     // 0–59
  season: 'spring' | 'summer' | 'autumn' | 'winter';
  year: number;       // starts at 1
}

Real-time to in-game time ​

  • 1 real second = 1 in-game minute
  • 1 real minute = 1 in-game hour
  • 24 real minutes = 1 in-game day
  • ~12 real hours = 1 in-game month

This ratio was chosen so the player can witness a full day in a single sitting.


Tick ​

The world advances in hourly ticks. Each tick:

  1. The clock advances by 1 hour.
  2. Every active NPC runs through the Tick Pipeline.
  3. World state is persisted.
  4. SSE events are emitted (if anyone is listening).

Ticks are driven by a Cloudflare Cron Trigger running every real-world minute (since 1 minute = 1 hour).


Schedule of a Day ​

TimeWhat happens
05:00–06:00A few early risers (bakers, fishermen)
06:00–09:00Town wakes, breakfast, commute
09:00–12:00Morning work block
12:00–13:00Lunch break
13:00–17:00Afternoon work block
17:00–19:00End of work, leisure begins
19:00–21:00Dinner, family time
21:00–23:00Pub, café, walks
23:00–05:00Sleep (with shift workers active)

Seasons ​

SeasonDaysCharacteristics
SpringDay 1–30Flowers bloom, more outdoor activity
SummerDay 31–60Hot, longer days, more social events
AutumnDay 61–90Leaves fall, harvest at market
WinterDay 91–120Cold, more indoor gatherings, illness risk up

Seasons affect:

  • 🧥 Clothing sprites
  • 🌦️ Weather probability
  • 🏥 Illness rates (winter up 30%)
  • 📖 Diary tone (more introspective in winter)

Year and Beyond ​

Each year = 120 in-game days = ~48 real-world hours.

In-game events tied to year progression:

  • 🎂 NPC birthdays
  • 🎉 Town anniversary (Day 120)
  • ❄️ Winter solstice
  • 🌸 Spring festival

The simulation has been designed to run for years without collapse. Memory pruning and consolidation prevent unbounded growth.


Time Anomalies (Avoided) ​

The world clock never goes backward. There is no:

  • ⏪ Rewind
  • ⏸️ Pause
  • ⏩ Fast forward
  • 💾 Save / Load (single timeline)

This is a core principle — see Philosophy.


History (Sample First Week) ​

These are examples of emergent events. Not scripted.

  • Day 1, 18:00 — Margaret and Eleanor met at the pub for the first time.
  • Day 2, 11:00 — Tom began his new night shift schedule.
  • Day 3, 14:00 — Maria and Yuki argued at the market over stall placement.
  • Day 4, 09:00 — Henry reported a small theft at the general store.
  • Day 5, 19:00 — Margaret invited Eleanor for dinner on Day 8.
  • Day 6, 22:00 — Tom and Sam had a long conversation at the pub.
  • Day 7, 08:00 — Tommy complained about homework in his diary.

These are emergent — generated by the simulation, not pre-written.

Last updated:

Released under the MIT License.