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:
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:
- The clock advances by 1 hour.
- Every active NPC runs through the Tick Pipeline.
- World state is persisted.
- 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
| Time | What happens |
|---|---|
| 05:00–06:00 | A few early risers (bakers, fishermen) |
| 06:00–09:00 | Town wakes, breakfast, commute |
| 09:00–12:00 | Morning work block |
| 12:00–13:00 | Lunch break |
| 13:00–17:00 | Afternoon work block |
| 17:00–19:00 | End of work, leisure begins |
| 19:00–21:00 | Dinner, family time |
| 21:00–23:00 | Pub, café, walks |
| 23:00–05:00 | Sleep (with shift workers active) |
Seasons
| Season | Days | Characteristics |
|---|---|---|
| Spring | Day 1–30 | Flowers bloom, more outdoor activity |
| Summer | Day 31–60 | Hot, longer days, more social events |
| Autumn | Day 61–90 | Leaves fall, harvest at market |
| Winter | Day 91–120 | Cold, 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.