
-----------------------------------
DJ
Sat Jun 28, 2003 1:21 pm

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

-----------------------------------
Tony
Sat Jun 28, 2003 2:04 pm


-----------------------------------
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.

-----------------------------------
naoki
Sat Jun 28, 2003 11:21 pm


-----------------------------------
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

-----------------------------------
SilverSprite
Sat Jun 28, 2003 11:27 pm


-----------------------------------
whats this? naoki becoming quite the computer whiz

-----------------------------------
Andy
Sun Jun 29, 2003 1:38 pm


-----------------------------------
yepp naoki is the smart...

-----------------------------------
DJ
Sun Jun 29, 2003 3:21 pm


-----------------------------------
process timer
    var timer2 : int
    timer2 := 0
    clock (timer2)
    locate (1, 1)
    put timer2 / 1000 : 0 : 2, " seconds"
end timer

this is what i used and it worked!

-----------------------------------
naoki
Sun Jun 29, 2003 3:34 pm


-----------------------------------
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

-----------------------------------
Andy
Mon Jun 30, 2003 8:22 am


-----------------------------------
they were, we were just suprised that u'd help...

-----------------------------------
naoki
Mon Jun 30, 2003 1:25 pm


-----------------------------------
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

-----------------------------------
Andy
Tue Jul 01, 2003 7:30 am


-----------------------------------
hardcore turing? ahahahaha this is not extreme beach volley ball u know... even though crono made a crappier version of it

-----------------------------------
krishon
Tue Jul 01, 2003 4:26 pm


-----------------------------------
lol....dun't go hardcore turing....how bout c++?? at least u won't get made fun of by goin hardcore turing

-----------------------------------
Andy
Tue Jul 01, 2003 5:41 pm


-----------------------------------
ya hardcore turing tells others that uran amature..

-----------------------------------
SilverSprite
Tue Jul 01, 2003 6:05 pm


-----------------------------------
you must be some amateur then.. especially since you dont know how to spell amateur

-----------------------------------
Andy
Tue Jul 01, 2003 6:07 pm


-----------------------------------
shut up silversprite, who cares about spelling on this site look at dan *points to dan in the conner with the book of typos*

-----------------------------------
naoki
Tue Jul 01, 2003 10:14 pm


-----------------------------------
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?  :P

-----------------------------------
SilverSprite
Tue Jul 01, 2003 11:43 pm


-----------------------------------
lmao naoki..

-----------------------------------
Amailer
Wed Jul 02, 2003 12:27 am


-----------------------------------
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?  :P


AHAH very nice one :0

-----------------------------------
Andy
Wed Jul 02, 2003 9:26 am


-----------------------------------
die naoki, and no more free bits to u...

-----------------------------------
UBC_Wiskatos
Wed Jul 02, 2003 11:13 am


-----------------------------------
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().
