World Time Plugin for Godot 4
A downloadable asset pack
The plugin provides systems that manage the progression of time in your game world updating a TimeState with game seconds, DateTime, and TimeOfDay. A key point of the plugin is that is that the time scales to your game world with a settable game speed, a customizable calendar system and time scale resource for having full control over how the flow of time progresses in your game. By maintaining the TimeState and world AgeState, other objects can hook into the data to trigger any time or object age based events you need through signals.
Tutorials & Updates Playlist
0.4.1 to 1.0.0 Upgrade Tutorial
World Time Playlist on YouTube
Coming Soon
- 1.0 Full Demo & Setup Video
Key focus of 1.0.0 was bringing the data of the plugin into State resources. Majorly improved over the previous releases is the introduction of the TimeState and AgeState resources. Pulling from the idea of a signal / event bus, these state resources also store the current and in some cases historical values of Time and Age within the game world. By sharing a world TimeState and AgeState between objects that want to reference the data, you can reference the data as it is updated with values and signals are emitted without ever connecting directly to the GameTimeSystem, DayNightCycleSystem, or WorldAgeSystem.
Here's a preview of the main systems and components in this package
There are currently 3 major systems that handle the processing of data and emission of signals through the Time State and AgeState resources.
- Game Time System - Tracks the time and date as real world time progresses by converting it to game time changes and storing game seconds and DateTime data on the TimeState which emits signals as it's values are updated so you can easily create time based events.
- Day Night Cycle System - Uses the HoursTime from the current DateTime in order to determine what time of day it is. After calculating a new TimeOfDay, it is emitted on the TimeState through time_of_day_changed signals. This is useful for game events or lighting that wants to rely on the TimeOfDay as a triggering event like switching the lighting color with TimeOfDayDirectionalLight2D nodes.
- World Age System - After a set amount of game time passing, the world age will increase and emit ageing signals on the world AgeState. This can be used by components like AgeingComponent to age other objects in the game and replace them with new scenes through a nested SceneReplacement resource (switch out a young character to an adult one with different game mechanics for instance)
Useful Components that React to Game Time
- TimeOfDayDirectionalLight2D - Light that reacts in color and intensity as the time of day transitions from one to the next one.
- AddAfterGameSecondsComponent - Calls add(amount : float) on another node after game seconds elapsed. Handy for replenishing depleted resources in the game as time progresses.
- AddWhenAgeingComponent - Calls add(amount : float) on another node after the current age on an AgeData resource increases. Can be another way of replenishing a resource or increasing some other statistic as age milestones are reached in your game.
The plugin README.md has details about setting up each system with relevant signal bus resource objects and components to receive the data from for game play mechanics.
Assets Used in Screenshots & Videos (Not Included in Plugin)
Status | In development |
Category | Assets |
Author | Chris' Tutorials |
Tags | 2D, Godot, godot4, lighting, plugin, time |
Purchase
In order to download this asset pack you must purchase it at or above the minimum price of $30 USD. You will get access to the following files:
Development log
- 1.0.2 Starting Date Hotfix90 days ago
- 1.0.1 Bug Fixes & Warning ImprovementsMay 10, 2024
- 1.0.0 Release - Stateful Shared ResourcesMay 05, 2024
- 0.4.1 Full Video Tutorial, Useful Tester UIs, and Bug FixesOct 25, 2023
- 0.4 Cleaner Signals and DateTime StructureOct 12, 2023
Leave a comment
Log in with itch.io to leave a comment.