racer home

Time of Day (TOD)

 

Home Play day or night using time of day.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

Introduction

Racer includes a notion of the time of day. Normally, the sun's colors are defined in a track's special.ini file, but the 'time' script command can overrule those values based on a time-of-day.

Setting Time of Day

Use the console command 'time' to set the time, for example: 'time 1400' sets the time to 2 o'clock in the afternoon. Other examples: 'time 0700', 'time 2300'.

The time sets the sun color, position, diffuse & ambient colors. It also changes the sky clear color, which is the color that the framebuffer is cleared with on every draw. To take advantage of this, don't add any opaque sky domes, but rather add blended ones. Those may include clouds for example.

Per-track Time of Day (TOD) settings

Normally, the TOD settings (that define a number of atmospherical properties for the 24 hours in the day) are stored and loaded from data/renderer/tod. You can define them per track as well, in which case you need to put the .crv files in data/tracks/<yourtrack>/tod.

Use the 'edit tod' console command to start the time-of-day editor. Note that saving saves the current track curves where they were defined, and the global TOD curves where missing. Take note of the filename of the curve in the editor to avoid mistakes! Best is to copy all .crv files in data/renderer/tod to your track's tod directory before starting editing.

More information on the Time of Day editor can be found here.

Testing a track

To test how well a track handles the time-of-day command, just load it up and enter the console command 'fast_time 1500'. This starts a fast day/night cycle so you can check odd things. Issues may very well include:

 


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated February 22, 2013 )