0
\$\begingroup\$

I am creating a simple punching game that counts the total number of punches dealt.

Could you suggest a way for my game to visually accommodate very large numbers (>100000). Currently my wire-frame looks like this:

enter image description here

How should I display very large numbers here? I thought about shrinking the fonts, and creating abbreviations, but I'm not sure it's the proper way to go.

\$\endgroup\$
  • 5
    \$\begingroup\$ Where's the problem? You can't store it? You can't display it? \$\endgroup\$ – Bálint Jan 21 '18 at 17:57
  • \$\begingroup\$ in the game AdVenture Capitalist they do this by giving a name \$\endgroup\$ – sketcherskt Jan 21 '18 at 18:08
  • 1
    \$\begingroup\$ 100,000 might look like this "100 thousand" or "1 million" or "100 billion" \$\endgroup\$ – sketcherskt Jan 21 '18 at 18:09
3
\$\begingroup\$

A 64-bit unsigned integer can represent values from 0 to 18,446,744,073,709,551,615. That should be plenty large enough to track the number of punches scored by a user in your game.

As for displaying the value... at a bare minimum you should make sure to use the (locale-specific) appropriate digit grouping and separators. The number above is formatted using the US English convention of putting commas between every three digits, for example.

For really big numbers, though, digit grouping starts to get less effective. At that point, breaking the value down into pictographic groups can help. For example, represent every 1,000 hits with a punching glove icon and every 10,000 with a punching glove with a stick of dynamite on it, or something. Then you can draw large scores as (assuming * is the punching glove icon, and ! the glove-with-dynamite icon):

2! 3* 122

Which represents 23,122 hits. You can adjust the scales accordingly, of course. This means that users only really need to track a three digit value in their head as they glance at the score, which should be reasonable for most people.

Writing out the values as words, as noted in the comments, is also a good option. However, if you expect your scores to get really big, icons will take up less horizontal space. And you don't have to translate them into other languages (probably).

The downside, of course, is that it may not be immediately obvious what value each icon stands for.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.