Posted May 22, 2025 by Chris' Tutorials
World Time 1.2.0 introduces persistent serialization support for your time systems — including TimeState, WorldAgeSystem, and the runtime AgeStates attached to each AgeingComponent.
Saving and loading is now fully supported out of the box via a new scene node: WorldTimeSerializer, designed to integrate seamlessly with your game’s existing save/load pipeline.
💥 Breaking Changes
SceneReplacement is now a Node called AgeingSceneReplacement and needs to be added to your scenes seperately. It targets the AgeingComponent to get the AgeState.
AddAfterGameSeconds renamed from AddAfterGameSecondsComponent
AddWhenAgeing renamed from AddWhenAgeingComponent
🧠 Under the Hood: Refactoring for the Future
This release started as a bugfix… and quickly became a major architectural update focused on testability, maintainability, and plugin stability.
Most logic has moved into standalone classes (like TimeStateLogic and CalendarLogic), making unit testing and component reuse much easier.
✅ 239/239 GdUnit tests currently pass — but if you hit issues, please reach out! (Note: In 1.2.1 the remaining tests have been brought back in and confirmed passing.)
🔄 What’s Changed at Runtime?
You’ll still use the same scene nodes and the GameCalendar resource, but there’s one big shift:
🔁 AgeState is now runtime-only
AgeState is no longer a Resource — it’s now a RefCounted runtime object.
AgeingComponent holds the scene’s AgeState and exposes it to connected nodes.
Scripts like AddWhenAgeing and AgeingSceneReplacement now reference AgeingComponent, not a global registry.
AgeStates are automatically registered/unregistered via AgeingComponent, simplifying save/load via WorldTimeSerializer.
🧾 Patch Notes: World Time v1.2.0
✨ New Features
WorldTimeSerializer: Central node for serializing and restoring all time systems.
Included by default in world_time_systems.tscn.
Age System Updates:
AgeState: Now a runtime-only RefCounted object.
AgePreset: Optional Resource for default age values.
AgeingComponent: Attach to any scene for age tracking.
AgeingSceneReplacement: Swap scenes when an age threshold is met.
AddWhenAgeing: Add values/resources when specific ages are crossed.
🧩 Logic Refactor Highlights
All core logic now lives in clean, scene-independent classes:
DayNightCycleLogic: Handles transitions and current/next TimeOfDay.
CalendarLogic: Manages date advancement, weeks, and validation.
TimeStateLogic: Drives game time updates and emits signals.
GameTimeSystemLogic: Ticks time, processes next-day events, updates TimeState.
✅ Why It Matters
Testable: Logic is modular and decoupled from scenes or UI.
Maintainable: Clear class responsibilities = fewer bugs, easier upgrades.
Extensible: Replace or extend logic without breaking your system.
Production-Ready: Built-in save/load support for time-based systems.
📌 Notes for Upgraders
Add WorldTimeSerializer to your scene tree and connect it to your save system.
Use AgePreset to define default ages for AgeingComponent nodes.
Update age-aware scripts to use AgeingComponent instead of managing AgeStates manually.
This update took longer than expected, but it’s a major step toward a rock-solid, save/load-ready time system.If you’re already using World Time — thank you! 💛 And as always, feedback and bug reports are hugely appreciated 🙏