Search Unity

How to make infinite damage increasing?

Discussion in 'Game Design' started by leegod, Aug 2, 2018.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    I sawed some mobile game that has infinite damage increasing system,

    I remember that after damage 10000 or 1000, it become 'a', so 9999 then become 1a.

    and then 9999a -> 1b. and so on. until 9999z

    I forgot what game it was so I don't know exact how it worked, but have you any link or info about it?

    and what about it become up to finish? like 9999z and after that what?

    1aa? or?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,156
    Why? It's a pointless feature. Just use numbers in a scope that people can understand rationally instead of having to literally learn a new way to count.
     
    Unknown33 and JoeStrout like this.
  3. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    You could just go with a letter increment (just next ascii index):

    9999z -> 1za ... 9999za -> 1zb ... etc.

    I never played clickerHeroes to that extent.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Why wouldn't you use something that people actually recognize? 1,000 = 1K or 1G, 1,000,000 = 1M, 1,000,000,000 = 1B, 1,000,000,000,000 = 1T

    Inventing a new number system sounds clever, but is actually lazy and unintuitive UI design.
     
  5. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    ... what? why?

    That sounds especially confusing when you're looking at something like 1a. If I saw that my score was 1a, I would intuitively think my score is 26.

    How high are your score actually going? A regular 64-bit unsigned int can store a value past 18 quintillion. I couldn't imagine it possible to score that high in any game. If you scored a million points per second, it'd take you a half a million years to reach that limit (literally, I did the math.)
     
  6. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Scientific notation.
     
    Lurking-Ninja likes this.
  7. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    They're asking about after you run out of M,B,T,Q etc.

    Cringe.

    That's why we implement our own data types.
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    A double precision floating point number can store a great deal higher and once you're into the quadrillions does it matter how accurate the hundreds are? Combine that with String.Format (and a little math) and you can show the number any way you want.

    https://msdn.microsoft.com/en-us/library/system.string.format(v=vs.110).aspx
     
  9. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Because it is not infinite. And also, int value's maximum value is 2.4 billion.
     
  10. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Because current system is not infinite.

    And also, that 18 quintillion is ugly to show at UI. Then it will consume all the space.
     
  11. scoreValue.ToString("X")
     
  12. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    A computer cannot support an infinite system. Eventually you run out of memory regardless. So you always have an upper limit, just where you want it to be is what you need to decide.

    18,000,000T is how I would represent 18 quintillion. It doesn't seem that ugly. It is less well known, but standard practice to represent 18 quintillion as 18E or 18,000P.
     
    Last edited: Aug 7, 2018
    angrypenguin likes this.
  13. Shayke

    Shayke

    Joined:
    Dec 8, 2017
    Posts:
    352
    I wanted to know the best way too, nice question!
    Why people care why he needs that? just help...
     
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Because they're asking in the section of the forums dedicated to the "why" and not the "how". If they only wanted the "how" then they should have posted in one of the sections appropriate for the "how". Like Scripting.

    That being said the purpose of the forums is not just answers. It's discussions centered around the question and the answers for it. If you just want an answer with no discussion there are better places like Unity Answers.

    Just keep in mind that we're all volunteers here. If someone is rude about it they're just as likely to get no answer at all.
     
    Last edited: Aug 13, 2018
  15. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Helpful people help, it's simple. If you are steadfast in your decision-making, be steadfast!

    If you are too sensitive to intake suggestions from random people on the internet without letting them get you all defensive, don't ask. People taking the time to dig deeper into your issues is a positive thing. Just because people question you, doesn't mean they think they are smarter/better.

    Every time you run your decisions through a filter, you get a chance to refine them. Maybe you are a misunderstood arteest and you don't give a damn about peoples suggestions. Fine. You can kindly ignore them.
     
  16. Shayke

    Shayke

    Joined:
    Dec 8, 2017
    Posts:
    352
    Hmm, i understand now. thanks.
    I did not try to be rude or something, i just thought it's a specific question about how to.
     
  17. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Letter base rank system is not new, people understand them just fine, he is not reinventing a number system as letter are ordered too. But I would simply use all system above, a power of ten notation (K, M, G, T, etc ...) which might be more confusing past the usual 4, then a rank system to indicate cycles of damage range. Also it's infinite if you store them in different variable, an unsigned 64 bit int goes to 18 quitillions, if you use another unsigned int to increment cycle, you square that number, and you can use as many unsigned int to count new cycle inside a list, if you ever need them or reach those ridiculous number.
     
  18. Unknown33

    Unknown33

    Joined:
    Aug 18, 2018
    Posts:
    170
    Even if you append hexadecimal notations, it's still not infinite. You cannot express infinity in an integer, therefore you will have to keep appending more letters.

    What you are describing is just a counting system with base 26 instead of base 10.

    In your case each time you exceed 9999 you increment the following letter.

    9999a -> 1000b (b = 0)

    1000c = 100,000

    Weird.
     
  19. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    It's interested that no one has suggested simply using a number library. GMP allows you to have numbers limited only by your total RAM. A quick search on Google shows that there are multiple C# wrappers for this tool. I've used it before in C++ and it's very easy to use and fast hell.