Vǫrðr Forge Steam page

Building a World

Sky and Time of Day

The sky is an object

Each map has one sky or none. It is a row in the Outliner. Select it to see its settings in Properties: which sky document it wears, the sky type, atmosphere, stars, star turn, how many suns and moons it has, and the hour. Press Delete to remove it (the map then shows a plain colour behind everything); Add… > Sky puts it back.

The sky has no draw order to set: it is always behind everything in the world. A picture, a model or a character in front of it keeps its own distance, so the sky's air and clouds, the fog, the weather and the water lie over it only as far as it stands from the eye.

A picture in the world hides what is behind its solid pixels. Its half-clear pixels, a soft edge, blend with the air and the ground behind them and take the same air as the rest of the picture. Where a half-clear pixel holds the colour of the picture's clear ground (a magenta ground erased with a soft brush, say), the picture's own edge colour is drawn there instead, so no ring of the ground's colour shows.

The sky selected in the Outliner, with its settings in Properties.
The sky selected in the Outliner, with its settings in Properties.

The sky's settings are a document of the project's, assets/skies/default.vfa, so every map with a sky shares them. A map can wear a different sky document instead (skyasset in its manifest), and records when it has no sky at all (sky off). A new 2D map starts with no sky.

The Sky panel

The Open in Asset Manager button in the sky's Properties opens the whole sky in the asset manager. Its parts are listed down the left:

Sky
The sky type (clear, fair, overcast, storm, alien or void), atmosphere, stars and how fast they turn, exposure, and how strong the sun and its glow are. Under Clock, the length of a day.
Atmosphere
The air itself: its height, colour, haze and ozone, and what shows below the horizon.
Clouds, High clouds
Two layers of cloud, each with its own type, coverage, height, colour and wind. The clouds are shapes in the air, not a picture on the sky: walk under them, fly over them, and they throw their shadows on the ground. Preset gives a layer a whole look in one pick (Fair cumulus, Storm front, Cartoon puffs and the rest), and every dial stays yours after. Style is how the layer is shaped and lit: realistic, painterly, cartoon, wispy or storm. Seed picks which field of clouds; the same seed lays the same sky every time. Silver lining, Low sun glow and Shade colour are the light on the cloud. The weather moves these dials while it holds, and gives them back.

How finely the clouds are drawn belongs to the machine, not the sky: Clouds in the viewport's Quality menu, and the same row in a game's Video settings (Off, Low, Medium, High, Ultra).

Suns and moons
Add Sun, Add Moon and Remove. Each has its own day length, a start, an arc height, where it rises, a size, a brightness, a colour, and whether it lights the ground. A moon shows its phase.
Constellations
Add Constellation, then place its stars.

Every slider of the Sky panel has a number box beside its rail. Click the box, type the value and press Enter: the value is set exactly, kept within the slider's ends, and the rail shows it.

Day length, under Clock, is the real minutes one full day takes, from 0 to 120. At 0 the sun stands still. It is saved as daynight in game.vdc.

The sky in the asset manager, its parts listed down the left.
The sky in the asset manager, its parts listed down the left.

The same sun lights the ground, the models and the sky, so moving the hour moves the shadows too.

Sun follows the hour, under Time in the sky's Properties, shows dusk and night in the editor: on, the sun and the sky's light follow the Hour row; off (the default), the editor's sun stays where it is placed. It changes the view only, not the map.

Day and night

Lines in assets/game.vdc:

daynight <minutes>
Real minutes for one full day. 0 or absent: the clock stands still. The Sky panel's Day length writes it.
sunrise <hour>, sunset <hour>
When day begins and ends. Dawn and dusk blend over about two hours around each.
suncolor RRGGBB, mooncolor RRGGBB
The tint of daylight and of night.
persistenttime on
The day keeps turning while the game is paused or its window is in the background.

Night falls in play on 2D, 2.5D and 3D maps alike; the editor keeps its daylight while you work. How dark midnight gets is night_depth in assets/data/tuning.vfa. A map's own darkness is its floor: a dark swamp stays dark at noon. A map whose manifest says indoor ignores the sky entirely.

From a script

time 21              set the hour (0 to 24)
sky type overcast    change the sky type
sky stars 2          how thick the stars are (0 to 8; 1 by default)
map sky off          this map has no sky