
-----------------------------------
threatbinder
Thu Dec 17, 2009 8:32 pm

keeping track of time for a turn based game?
-----------------------------------
Time.Elapsed is since the program is run, so how could I do a per turn timer, make it reset every turn back to a certain number in seconds? I tried looking at all the time functions, and they're all pretty useless.. why do we need to know the amount of seconds since 1970? lol

-----------------------------------
apomb
Thu Dec 17, 2009 9:09 pm

RE:keeping track of time for a turn based game?
-----------------------------------
possibly take a look at [url=http://compsci.ca/holtsoft/doc/time_delaysincelast.html]Time.Delaysincelast in conjunction with Time.Elapsed will allow a process to take a certain amount of time, instead of simply delay() which could be different on different machines.

-----------------------------------
Tony
Thu Dec 17, 2009 10:33 pm

Re: keeping track of time for a turn based game?
-----------------------------------
why do we need to know the amount of seconds since 1970? lol
The Universe started [url=http://en.wikipedia.org/wiki/Unix_time]on January 1st, 1970. Anyone to says they are over 39 years old is lying about their age.

http://xkcd.com/376/

-----------------------------------
mirhagk
Fri Dec 18, 2009 12:43 am

RE:keeping track of time for a turn based game?
-----------------------------------
k so at the beginning of the turn you record the time in a variable, let's call it t. then the amount of time the turn is taking is Time.Elapsed-t
