I am trying to make a realistic day/night/season simulator for a BGE project. the lighting and sky will be animated based on the time of day, and the ground will have 365 frames - animated between green grass, leaves, and snow, as the seasons progress. I know how to make everything run perfectly, except for one part.
I have an object, called Time of Day Control Empty. (the name could easily be changed if it is too long, or the spaces are a problem)
I need a script to, upon running, find how many days it is into the year, and assign that value to the property "Day"
Then, I want the script to constantly update the property "Minutes" with the value of how many minutes into the day it currently is based on the current time.
The property "Day" should only range between 0-365, and the property "Minutes" should range between 0.00-1440.99 - It would be nice if the seconds were represented in .00 - .99 based on how far it was into each minute, at the end of the float property "Minutes," but that isn't really necessary.
Supposing that the current time was 2:27:27 PM on December 25th, the properties should look just like this:
I'm sure this is possible, but I have no idea where to start. How can I go about making this script?