Number Suffixes

0 favourites
  • 3 posts
From the Asset Store
Jump on numbers in the proper order and reach the sun!
  • With the current popularity of the idle game genre, I thought I'd give my own shot at it, and it's mostly math in the background I realize that simply has a GUI. But there is one thing I can't seem to get the hang of.

    If you've ever played an idle game, you'll know that money (or other currencies) gets to a pretty high level. My problem is that I can't quite get my head around the logic behind number suffixes or just number formatting in general.

    For instance, 1 million might be 1.00M or 1x10^6 or 1 Million and so on and so forth with larger numbers like Novemquadragintillion or 1x10^150.

    How would one do this in as simplest terms as possible with the event system?

    To create some specific question points:

    How does one format numbers with suffixes like Million or M?

    How does one format numbers with scientific notation?

    How does one format numbers with a specific amount of decimal places show at all times? (1,000 as 1.00K and 100,000 as 100.00K and so forth)

    How does one change from one suffix to the next forwards and back (as in gaining money and spending it per the idle game idea)?

    I've pretty much got a hold on everything else but this is just something I feel like I need some extra assistance/explanation on.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here's a recent tutorial with a possible solution.

    https://www.scirra.com/tutorials/1447/u ... tial-games

  • R0J0hound -- This is perfect! Man, I searched the tutorial section for hours and can't believe I didn't find this. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)