Modules: World Systems¶
Day/night cycle, weather, and seasons (@rbx/world-systems). Status: Implemented (29 tests).
Purpose¶
- Configurable day/night cycle with lighting presets per time period.
- Dynamic weather system with smooth transitions and intensity.
- Seasonal rotation with weather weight modifiers.
- Unified
WorldStatesnapshot for networking and UI.
Core rules¶
WorldManageris tick-driven: callupdate(deltaSec)each frame.- Day/night clock runs continuously from 0–24h; cycle speed is configurable.
- Weather auto-transitions after cooldown; can be overridden via
setWeather(). - Seasons advance by in-game day count, adjusting weather probabilities.
- All state is server-authoritative; clients receive replicated
WorldState.
Data model¶
WorldState—clockTime,timePeriod,activeWeather,weatherIntensity,activeSeason?,dayCount,isTransitioningLightingPreset—period,startHour,ambientColor,brightness,fogEndWeatherDefinition—type,durationRange,intensity,windSpeed,particleDensitySeasonDefinition—type,durationDays,weatherWeights,foliageTint,temperatureModifier
No per-player persistence (world state is global/server).
Time periods¶
dawn → morning → noon → afternoon → dusk → evening → night → midnight
Weather types¶
clear, cloudy, overcast, rain, heavy_rain, thunderstorm, snow, blizzard, fog, sandstorm, wind
Config/flags¶
world.dayNight.enabled(kill-switch)world.dayNight.cycleDurationSeconds(default 720 = 12-minute day)world.weather.enabledworld.weather.transitionDurationworld.season.enabled
Observability¶
world.time_period_changed— dawn/noon/night etc.world.weather_changed— weather transitionworld.season_changed— season rotation