created RaceClock function (with FOUR overloads!). this was needed primarily to tell when the player loses because they weren’t going “fast” enough (though in reality, and to be fair, we’re checking that they’re covering a minimum amount of DISTANCE in a certain amount of time). as coded, RaceClock is very useful for other applications besides testing “game over” condition, for example music intensity changes can be tested with it. in order to accurately keep track per-second-of-distance-traveled regardless of whenever RaceClock is queried, RaceClockUpdate is run every frame to maintain a history of distances (per second) over the last minute. this way distances can be evaluated over longer time periods. RaceClock documentation here (because I don’t know where else to put it) in case I forget how to use it later:
for more nuanced game mechanics, RaceClock can take in a distance target, sample time period (in seconds), and whether the distances should be averaged or summed, and evaluates if the player met the condition: e.g. RaceClock(80f, 20, false) will return TRUE if the player has FAILED to travel 80 meters over the last 20 seconds e.g. RaceClock(5f, 30, true) will return false if the player traveled an average of 5 meters/second over the last 30 seconds
if only given a sample period, RaceClock will return the total unaveraged distance traveled in that time: e.g. RaceClock(15) will return the total distance traveled over the last 15 seconds (same result as RaceClock(15, false) but with one less argument needed).
RaceClock can be supplied with a sample period and if it should average them, and will return the distance (or average distance) traveled in that time period: e.g. RaceClock(15, true) returns the average distance per second traveled over the last 15 seconds.
finally RaceClock can be used without an argument to return the current distance per second. e.g. RaceClock() returns 2.5f (indicating the player has travelled 2 1/2 meters over the last second)
did some more code cleanup and placeholder/pseudocode for crash/out-of-time handlers, and did some testing.
research into control of wheel skid sound volume/pitch/frequency,
get/set a car reference (e.g. to kill the engine)
researched the possibility of skidmark color/material changes based on physics material driven on
rudimentary game pause/unpause added (escape key)
new debugging messages added for RaceClock and Win/Lose.
debugging options now toggleable in RoadGen inspector; to include “God Mode” which will let you keep going despite Win/Lose condtions, and Sky Roads which sets the road height offset to 100 (normally 5 is max).
tidied up RoadGen inspector and added grouped headings.