Time of Day

Muds usually have a time of day like in the real world. Usually it is shorter than 24 hours. In Shattered World a day lasts 2 hours. The mud can specify the current time of day in the mud with the time 3d tags such as {tt15:17} to mean 3:17PM. The mud can also specify how long a day is such as {tl7200} for 7200 seconds per day. Given the length of a day and the current time of day the mud client will be able to keep time with the mud and can change the sky depending on the time on the mud. For example:

files/timeofday.jpg

The mud client can also change the brightness of the sun so that at sunset the brightness of the terrain can decrease. The colors used in the sky are hardcoded into mud client. The times of sunset and sunrise can be specified in the time attribute of environment. It can be overridden by the mud using time 3d tags such as {ts21:00} for the sunset being at 9:00PM.

At differerent times of day the brightness of the terrain and objects can change so that the terrain is darker at night. The change in brightness can be specified in backgroundcolors TERRAIN element. The terrain element is a list of colors vs time and the mud client will gradually the sun intensity to these colors as time progresses.

There is also the background color which is the color just below the horizon. If you are quite high up you can see it extending past the ocean. This color can also be changed at various times in the GROUND element of backgroundcolors.

Also the color of fog can be changed at different times of the day so that fog is darker at night than during the day. This can be changed in the FOG element in background colors.

Sun
files/sun.jpg

The mud client has a lensflare object that can produce a flare like youd see in a picture photographed on a sunny day when the sun might be in the background. The lensflare can be used to make a sun and is used in Shattered World like in the picture above. The sun is made up of lensflare with a lightsource and uses a hardcoded path called the 'sunellipse' that will move the sun in an elliptical orbit like the sun in real life and will move it based upon the time of day. It is this lightsource that is used to light up the terrain and is linked to backgroundcolors TERRAIN element. The link is inferred through the 'sun' attribute of the lightsource being set to true. The brightness of the lensflare can be changed by the weather so that if it is foggy it is less bright. The weather will change the lensflare this way if the lensflare's 'sun' attribute is true. The following is the object of the sun used in Shattered World:

<OBJECT name="sun" path="sunellipse">

<LIGHTSOURCE sun="true" />
<LENSFLARE resolution="128" size="90" sun="true" />

</OBJECT>