forums

TNT Basic Forums > Programming Q&A
game clock timer
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-15-2005 21:57

Posted by:
jamie

Click Here to Email jamie   Find more posts by jamie

I'm trying to figure out how to keep an accurate clock timer for my racing game I'm working on. For example when I press space to start the car I want a timer to start and run accurately until I cross the finish line. Does anyone have any thoughts on how to do that?

I'm messing with the TIMER command but not having much luck yet.

thanks
jamie

02-16-2005 00:15

Posted by:
greg3551

Location:
Milwaukee Wisconsin

Click Here to Email greg3551   Find more posts by greg3551

int t1
int t2

if space bar
t1 = timer
end if

t2 = timer - t1

t2 would give you the current time

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.