Game Development Community

On reach one millions of points...

by Isaac Barbosa · in Torque Game Builder · 08/10/2007 (4:26 pm) · 7 replies

Hello,

This was really surprisingly... and I don't know what to do.

Testing my game I have scored more than a million of points!

So a text object should show 1023000 points, but it has showed 1.00008 E + 006!

What should I do to show numbers greater than a million correctly?

Thanks

#1
08/10/2007 (5:29 pm)
Maybe have another counter for millions and start the other from zero. Unless you think someone can get 1 million million that should be fine ;) Not sure how you GUI is set up but if you put it left of the other counter it could look seemless..?
#2
08/10/2007 (5:42 pm)
Thanks Tom,

The problem is that I'm not using the GUI builder.... just a text object.
#3
08/10/2007 (6:22 pm)
If you've got access to the source code,
you could use this resource. it works for numbers smaller than 2,147,483,648.
#4
08/10/2007 (6:37 pm)
Thanks Orion,

I will try that cool resorce tomorrow ;)
#5
08/10/2007 (10:54 pm)
Ya know... in doom 1/2, when you got 100 kills it reset back to 00. Could do that here (make 1mil hard to get to. I know we tried to flip the frag counter before the other player in doom. Was hard!)
#6
08/11/2007 (6:11 pm)
I had the same problem a while back with trying to display the score as a readable number with bitmap style fonts. (using strings and matching the imagemap frame) I ended up storing the score in 3 properties (millions, thousands, hundreds). When one would get over 999 it would set to 000 and add 1 to the next property, etc. It also allowed for some cool number accelleration type stuff for making the score animate nicely depending on how large the queue of points is waiting to be added..
#7
08/13/2007 (5:16 pm)
Thanks Ezra. I will try that later. ;)