Real-Time clock... in Design Philosophy
|
|
Ok, I'm taking an approach of a real-time clock on my game. But, what way should I do this? I have all the current procs set up...as follows, but I can only see one way to start it up truthfully, by using world/New(). But, I also have it save that variables...but, I know these procs would greatly lag the game eventually to the point of crashing...
proc World_Year() if(worldmonth>=12) worldmonth-=11 worldyear++ return 0 World_Month() if(worldday>=30) worldday-=30 worldmonth++ spawn() World_Year() return 0 World_Day() if(worldhour>=24) worldhour-=24 worldmonth++ spawn() World_Month() return 0 World_Hour() if(worldminute>=60) worldminute-=60 worldhour++ if(worldhour>=12) worldnight_day=(worldnight_day.len)+1 spawn() World_Day() return 0 World_Minute() if(worldsecond>=60) worldsecond-=60 worldminute++ spawn() World_Day() return 0 World_Second() while(world) sleep(10) worldsecond++ spawn() World_Minute()
|
Anyone have a better solution, and or approach to this ordeal? If so, please post...
|