Integers don't seem to work for scores that get very high, should I use another Attribute type?
Hi, when my score gets up above 99999999, it starts to be displayed as something like 1.37748596e+12, or if you get high enough, "nan".
How can I safeguard against this? Should I be using "Index" instead?
I don't want decimal places, just "infinitely" large numbers.
To be clear, I'm not expecting players to really get above about 100,000 or 200,000, but when we released Flight Control at Firemint, we didn't expect people to get above a few hundred, but they got crazy scores up into 15,000 and beyond.
There's no judging what people might get! So I want to choose the safest option.
- Murray
How can I safeguard against this? Should I be using "Index" instead?
I don't want decimal places, just "infinitely" large numbers.
To be clear, I'm not expecting players to really get above about 100,000 or 200,000, but when we released Flight Control at Firemint, we didn't expect people to get above a few hundred, but they got crazy scores up into 15,000 and beyond.
There's no judging what people might get! So I want to choose the safest option.

- Murray
Answers
You helped make Flight Control?? That's awesome!!
As far as your question goes, I believe somebody else has posted that question before. It has to do with lua code using scientific notation to keep track of #'s. Have you had a search in the forums?
I would right now but I am on my iPhone.
Regards,
Jack McGraw
I was the lead designer on SPY Mouse for the first year of it's production, and worked on the Real Racing series, mainly working on the career mode for Real Racing 2.
Great company. I was there for 4 years. Then I split off to do my own games using Game Salad!
Hoping to get my first game out in the next month. But it's hard because I'm really excited about working on my next games after the first one! I've cut my teeth getting this first "simple" one finished, but I'm more excited about taking the lessons I've learnt and moving forwards with other games.
Anyway, better get back to it.
- Murray
PS: I'll have a look for this post about the scientific notation. Thanks!
http://forums.gamesalad.com/discussion/43171/display-large-integer
I can't see how you'd make that non-flickery, and it seems a bit "ugly", or something.
Is there another option?
Perhaps it'll be another side-effect fix that comes with the non-LUA update.
Please please lords of Game Salad, get me the update in the next week or two, and you shall have my first born.
- Murray
I'm not a coder or an artist, alas. I'm a game designer. And I've always had my hands tied when it comes to making my own games. I've often tried, and dreamt, but been stuck needing programmers.
But Game Salad has provided me with a way to finally make complete games on my own!
I've got a few prototypes going, but most of them are crippled by Game Salad's performance, which will hopefully be addressed soon with the non-LUA update.
Until then, I will focus on simpler games. Unfortunately, my first game that I've nearly finished is a bit of an action game. I tried to keep it simple, but it kind of expanded. *blush*
Anyway, I've cobbled together art for my first game, and in some ways, I just want to get it out, and move on. But one thing I learned at Firemint, for sure, is that it's always worth taking the time to really polish something before releasing it. But it being my first game I've actually "programmed" myself, it sort of is what it is! If I had my time again, I'd probably make a turn based game, or a word game, or something better suited to Game Salad.
Anyway, it's all up from here!
- Murray
for a code to convert numbers stored in scientific notation … to numbers for display
it is just an example of one way to do this …
the flicker is due to adding 999999 to the #
when implementing scoreIncrease … you will not be incrementing by such a large#
-click the sceneInstance of the button … hold down [option] and drag a new instance of button
-open it and the changeAttribute in Rule: when touch is pressed
-changeAttribute: scene.Background.display#.my# To: scene.Background.display#.my# +1
-no flicker
of course, the flicker will occur when the millionsDisplay becomes active due to the displayText behavior repositioning the text … so you might want to use a separate displayText for those millions … and align it correctly
also, in the event that my# becomes 0
… add a rule in the displayText to display 000000
==
Wow! what lovely impressive experiences you have had @Hymloe …
think your games will be great! … please get one out there for us to enjoy!
Thanks for clarifying how I could grab bits out of the example, for a tidier implementation in my projet.
All the best!
- Murray
I still can't believe you worked for Firemint. I specifically remember when they first released Flight Control that I knew they would keep going and do really well.
Anyways, sorry I wasn't of too much assistance, but I'm glad @MotherHoose was able to clear things up.
Regards,
Jack McGraw
- Murray