Computer Science Canada Timer |
Author: | DJ [ Sat Jun 28, 2003 1:21 pm ] |
Post subject: | Timer |
I want to put a timer in my game, and have it start when a player pushes start game or something the object of the game is to stay alive the longest, and i dont want to use a points system. thanks, DJ |
Author: | Tony [ Sat Jun 28, 2003 2:04 pm ] |
Post subject: | |
you could use clock() or wallclock() clock() says how much time has passed since beginning of the program in milliseconds. wallclock() is your system time, says how much seconds passed since Jan 1st, 1970. |
Author: | naoki [ Sat Jun 28, 2003 11:21 pm ] |
Post subject: | |
yah. use clock, and when u die put the current time to a textfile then just merely check if it's greater for a high score |
Author: | SilverSprite [ Sat Jun 28, 2003 11:27 pm ] |
Post subject: | |
whats this? naoki becoming quite the computer whiz |
Author: | Andy [ Sun Jun 29, 2003 1:38 pm ] |
Post subject: | |
yepp naoki is the smart... |
Author: | DJ [ Sun Jun 29, 2003 3:21 pm ] | ||
Post subject: | |||
this is what i used and it worked! |
Author: | naoki [ Sun Jun 29, 2003 3:34 pm ] |
Post subject: | |
you'll prolly need a delay after the put statement and u dun need 2 initialize the variable (even a little helps) ....... since i'm dense to sarcasm, i'll assume those were compliments |
Author: | Andy [ Mon Jun 30, 2003 8:22 am ] |
Post subject: | |
they were, we were just suprised that u'd help... |
Author: | naoki [ Mon Jun 30, 2003 1:25 pm ] |
Post subject: | |
nah this stuff is child's play. i gotta start going hardkore Turing learning so i can argue w/ every1 about raycasting and that stuff |
Author: | Andy [ Tue Jul 01, 2003 7:30 am ] |
Post subject: | |
hardcore turing? ahahahaha this is not extreme beach volley ball u know... even though crono made a crappier version of it |
Author: | krishon [ Tue Jul 01, 2003 4:26 pm ] |
Post subject: | |
lol....dun't go hardcore turing....how bout c++?? at least u won't get made fun of by goin hardcore turing |
Author: | Andy [ Tue Jul 01, 2003 5:41 pm ] |
Post subject: | |
ya hardcore turing tells others that uran amature.. |
Author: | SilverSprite [ Tue Jul 01, 2003 6:05 pm ] |
Post subject: | |
you must be some amateur then.. especially since you dont know how to spell amateur |
Author: | Andy [ Tue Jul 01, 2003 6:07 pm ] |
Post subject: | |
shut up silversprite, who cares about spelling on this site look at dan *points to dan in the conner with the book of typos* |
Author: | naoki [ Tue Jul 01, 2003 10:14 pm ] |
Post subject: | |
dan has typos dan is mod dan can ban dodge dan can ban dodge dan can ban dodge oops, did i repeat the last one too much? |
Author: | SilverSprite [ Tue Jul 01, 2003 11:43 pm ] |
Post subject: | |
lmao naoki.. |
Author: | Amailer [ Wed Jul 02, 2003 12:27 am ] |
Post subject: | |
naoki wrote: dan has typos
dan is mod dan can ban dodge dan can ban dodge dan can ban dodge oops, did i repeat the last one too much? AHAH very nice one :0 |
Author: | Andy [ Wed Jul 02, 2003 9:26 am ] |
Post subject: | |
die naoki, and no more free bits to u... |
Author: | UBC_Wiskatos [ Wed Jul 02, 2003 11:13 am ] |
Post subject: | |
The system clock is much more accurate, I would use that if I could. I'm not sure what Turing's clock is based on, but that system clock (rather, Windows clock) seems to be like the Windows API function GetTickCount(). |