Game Development Community

Graphical count down timer

by Gavin Beard · in Torque Game Builder · 06/23/2008 (6:42 am) · 1 replies

Hi all,

Just after a bit of guidence really. I am currently working on a small puzzle game in BlitzMax, i am hoping to move across to TGB to finish it off as alot of stuff is alot easier to do really. However, the one thing i'm going to struggle with is a Graphical count down timer. Has anyone done this or got some pointers on what i may do to achieve the affect. By graphical, i mean that i have a png file with rendered images of numbers 0 - 9 and : and . in it, when i retrieve the current time remaining (which is generated by an internal timer decreasing the time remaing value every second) and then steps thru a string that is formated such as 01:23 printing the relevent number from that string to the screen at a given coordinate.

any help will be great :-)

thanks

#1
06/23/2008 (6:53 am)
1) Grab the system time at the start of the timer and store it for reference
2) start a schedule loop that:
a) gets the determines the difference between the current time and the referenced time
b) getWord for each digit
c) Display a graphical widget for each digit
d) rinse-repeat