How would you make endless damage increasing system?

So now I am making mobile simple RPG.

There are stats, damage, battle like others.

But as you know, int value’s max is 2.4 billion.

But game should give infinite growth illusion to users, not the feeling that there is no further job in this game.

How it should be made that endless damage increasing system?

Yes, but that’s only for a 32-bit signed integer. You can use a 64-bit unsigned integer.

https://msdn.microsoft.com/en-us/library/t98873t4.aspx

Then there are libraries for going beyond that.

http://biginteger.codeplex.com/

One major problem with infinite statistic growth is that they are never truly important. If the player’s health is growing by roughly the same factor as the enemy’s damage then the player can safely ignore all but a few of the left-most digits of the numbers being displayed.

Making an illusion could be as simple as adding random digits to the end of 16-bit values that never actually increase.

1 Like

@Ryiah yes there is ‘long’ type. But it is hard to display long number, its too long string.

And bit integer is not the answer too.

Use a floating point data type. (half, float, double). These cap out with some very high numbers.

At these very high numbers no one is going to care that you dropped a few digits of precision off the end.

1 Like

How to start low number of float? 0.000000000000000000000001 (10^34) ?

??? I don’t understand the question.

1 Like

Since you apparently don’t know anything about floating point numbers I’ll give a very rough explanation. Basically a floating point number stores two types of information. First, it stores a few of the digits making up a number (7 digits for singles, 15 digits for doubles). Second, it stores the exponent (the distance those digits are from the decimal point).

The difference between 0.000000000000000000000001 and 1.0 is literally the exponent. The number for both is 1.

1 Like

Are you talking about storing the values, displaying the values or both?

For storage you can use any of the methods others have listed. Also can make your own using arrays of bytes.

Display may be the tricker bit. Like you can display 787 for damage and 917 is better and easy to see that.

Ramping up to 1457921 and comparing to 1458123 takes more space and may not be as easy to compare. Changing format to 1.457M and 1.458M makes it shorter, easier to compare. Then you can go to B, T, Q, etc (if need more than Quadrillion may need to go to Qa, Qi, Sx, Sp, etc).

You could also use color coding and / or scale to represent growth. Maybe a dark red or tiny number is hundreds. A bit brighter red or bit larger number is thousands and so on. Or combine them all so you have tiny dark red 157, bit brighter red bit larger 2T, etc.

Not sure of the “endless” part. Seems like there would be an end eventually whether it is at Trillions or later on. But sooner or later due to time/boredom and content there would likely be an end.

2 Likes

Clickers just seem to add a few letters at the end so it always counts up to a certain max then increments the letters at the end. It gives the illusion of massive numbers without all the numbers being displayed.

Plus, if you are doing the equivalent of 500d6 damage & the enemies are doing 400d6 damage its just the same as doing 5:4 but the numbers look bigger. Of course, if you do 500d6 & the enemies do 4d6 then you need the bigger numbers to display it but would anyone bother playing a game that unbalanced that there would actually be a need to show it?

2 Likes

The display side can get surprisingly deep. In Diablo III it’s possible to do hundreds of millions of hit point damage, which you can optionally have displayed above monsters. The numbers started getting so big they made some changes like that as part of a patch earlier in the year.

There’s a super detailed write up on what they did that covers localization issues, color issues, etc:
http://us.battle.net/d3/en/blog/19996041/engineering-diablo-iiis-damage-numbers-1-22-2016

1 Like

Yeah that was probably part of my inspiration for that idea without really thinking about intentionally. I play a lot of D3 and noticed the numbers in there doing that M for million. Haven’t seen a B yet but I can generally do about 400M with a pillar and those appear in orange instead of yellow. Although I don’t really pay any attention to the numbers while playing (as long as enemies are dropping I figure all is going fine) I think it is a great system.

The only real issue is if you have a high attack speed it is kind of hard to really notice things anyway.
I just made a video of my monk and you can see the numbers popping up but they appear so quickly it almost becomes just “noise”.

1 Like

I mean, if I adopt int value for damage and display, it can start from 1~ int.maxvalue. It is intuitive. But if I adopt float system, where can I start? 0.0000001? (7 digits?) Still, this is only for calculation, not for display. So float calculation is better than int system because float can calculate more much numbers?

I was “into” D3 when the 2.4 patch came out. I had a decent witch doctor going who could do GR74’s (almost leaderboard material at the time). I regularly did damage in the billions, but it doesn’t change to a “B”, it’ll show 4500M or whatever. I guess it just makes it easier to compare with the other numbers. I don’t know if it ever goes to “B” (maybe if you do tens of billions, if that’s even possible?).

I have the same issue with fast attack speed and the numbers going by a bit too quickly. I did a video capture once just to see the numbers.

In my own space game, I have a similar thing where if a projectile weapon hits, I show the damage for each hit. But for beam weapons, I accumulate the damage I think five times per second before displaying it. It’s slow enough that you can see the numbers.

2 Likes

Interesting! GR74! Man that is high. I haven’t tried one past GR47 yet . Hey I have the same numbers at least just a different order. :wink: I mainly only play this monk. 1,016 hours so far over the past 4 years. Which I guess is nothing compared to many people who seem to play 50 hours per week but for me that is a lot of time.

Anyway, back on topic. Yeah that averaging system sounds like a very good way to do it. I used to just have the damage numbers turned off. Not sure why I even turned it on to begin with. I don’t see it as being valuable information. As long as the enemies are obviously taking damage (which is already known from watching their health bars) and eventually fall over or explode that is all I really need to know. I think my cousin asked me what my numbers were so I turned it on and never turned it off.

@leegod is this for displaying damage numbers on-screen in combat like Diablo 3 or are you talking about damage values shown over weapons in inventory, character screen or ??

I think I’ve played something like 500 hours since launch day four years ago. I kind of go in spurts. Definitely have not done 50 hours in a week, but now and again it’s kind of fun to embrace The Grind as a way to veg out after work. Some players have fun endlessly trying build variations, but I don’t have the patience for that (I just look up existing builds online). Eventually it devolves into paragon point grinding, and even many dedicated players will bail when it gets to that. But it’s definitely a deeper game than many people realize.

When I played with a couple of friends, the damage numbers were mostly for bragging rights. “I just crit’ed for six billion!” “What!?!?”

You’re right though, the numbers aren’t that useful for anything practical. The only real way to gauge your build is to see how high you can go on GR’s.

I think it’s fun for players to see when they get a critical hit though. There’s just something satisfying about getting that bonus damage.

Like in Borderlands, it was a big deal with huge, red, animated CRITICAL text over the enemies. The character I played (Roland) would often yell out “Critical, bitch!” Which never really got old. :smile:

1 Like

No. You start with the same value that you would have if you used an integer.

Yes and no. Once again if you go beyond seven (single) or fifteen digits (double) you will start to lose accuracy. If you need support for large numbers more than you need accuracy then they offer an advantage over integers, but if accuracy is very important then they are at a disadvantage once you go beyond the digit limit.

1 Like

Yes actually this seems most good for both calculation and display. So this go from A letter to Z? and next of Z?
And how to implement?

It doesn’t just go arbitrarily from A-Z, the letters actually mean something. Refer to the names of large numbers: https://www.wikiwand.com/en/Names_of_large_numbers

As for implementation, I actually wrote a simple implementation of a way to convert large numbers to more manageable numbers in JavaScript for a game I wrote a while back. You may have to adapt it a tiny bit for Unity, but it should help you start:

function makeNumberReadable(number) {
    var suffixes = [' ', 'k', 'm', 'b', 't', 'q', 'Q', 's', 'S', 'o', 'n', 'd', 'u', 'D', 'T']; //If you need more, just add them
    var suffixCount = 0;
    while (number >= 1000) {
        number /= 1000;
        suffixCount++;
    }

    number = Math.round(number * 10) / 10;
    return number + (suffixes[suffixCount] || '?');
}

This works all the way up to 1000000000000000000000000000000000000000000000 (1000T) as-is

I’m new to this forum, sorry if this isn’t the best way to post code

Edit: Now with code tags!

3 Likes

@Conquerd So what is that 'number’s type? int? float? long? while(number > 1000) it continues divide by 1000, but if number itself is too big, it causes error even before divide.

It’s a Number type, which has a max value of 1.7976931348623157e+308 (I believe it’s actually a double, Number is what JavaScript refers to it as)
If you go over that limit, you probably have massive scaling issues you need to sort out first.

But yes, it does go into an infinite loop if you try to use it with, for example, 1.7976931348623157e+309

The intent wasn’t to write your code for you, it was to provide you with a base to work from.