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

10-26-2006 23:29

Posted by:

in a place

Find more posts by warhampster

i was wondering how to make a timer and when it stops the game ends. help please!

10-27-2006 22:11

Posted by:

Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

it depends how your game is structured... if you're using a main loop, you can simply use a timer variable and have it increase with every loop iteration, stopping the game when it reaches a certain value.

10-28-2006 00:22

Posted by:

Click Here to Email appleide   Find more posts by appleide

But How do you measure time in terms of seconds?

10-28-2006 02:36

Posted by:

hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Use 'Timer'...

The timer variable (system) counts the number of clock cycles since the app booted. Use startTime=timer to set the clock and timeNow=(timer-startTime)/1000 to get elapsed seconds.

Danny (nods)

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.