03 February 2018

Guild Wars 2: Damage Increase Part 2: Next Three Tiers

So in yesterday's post, I set up the basis of everything and explained everything thoroughly. Thanks to this we can jump directly into the calculation. Especially since it makes no sense to go through everything again.

Recap

For us to continue our adventure we need to recap necessary information though. Just like a developer imports any libraries they need. The next step would be to compare the fine equipment with the masterwork quality. To compare these we have to get the stats from the fine gear which were 499 power, 355 precision, and 355 ferocity. The average weapon damage was 726.5. The formula we use is the following:

avgdmg = weaponStrengthAvg * power * (1 + ((prec / 21 / 100) + 0.05) * ((fero / 15 / 100) + 0.5))
dmg stands for damage; weaponStrengthAvg stands for the average weapon strength; prec stands for precision; fero stands for ferocity;


Fine vs Masterwork

Going through masterwork items we finally find Berserker accessories, rings, and amulets but no backpack as of yet. So let's add these to our calculation.

Item Name Power Precision Ferocity
Berserker's Prowler Mask 49 35 35
Berserker's Prowler Shoulders 37 26 26
Berserker's Prowler Coat 110 79 79
Berserker's Prowler Gloves 37 26 26
Berserker's Prowler Pants 73 52 52
Berserker's Prowler Boots 37 26 26
Berserker's Mithril Axe 98 70 70
Berserker's Mithril Axe 98 70 70
Berserker's Ring 73 52 52
Berserker's Ring 73 52 52
Berserker's Amulet 98 70 70
Ruby Mithril Earring 61 44 44
Ruby Mithril Earring 61 44 44
Total (Only armor and weapons) 539 384 384
Total (all) 905 646 646

Our weapon damage is 737 to 831. The average is (831 - 737) / 2 + 737 = 784.
Now that we have our data let's place both into the formula and see our results:

Fine damage:
726.5 * 1499 * (1 + ((355 / 21 / 100) + 0.05) * ((355 / 15 / 100) + 0.5)) = 1264753.86

Masterwork damage:
784 * 1539 * (1 + ((384 / 21 / 100) + 0.05) * ((384 / 15 / 100) + 0.5)) = 1418981.64

784 * 1905 * (1 + ((646 / 21 / 100) + 0.05) * ((646 / 15 / 100) + 0.5)) = 1990599.49

So if we just look at the same gear no new items the damage increase is (1418981.64 / 1264753.86) - 1 = 0.1219 or 12.19%.

If we take everything into account though the damage increase is (1990599.49 / 1264753.86) - 1 = 0.5739 or 57.39%. Understandable since we can now wear 5 new Berserker items.

Damage vs Armored Enemies

Since it's quite interesting to see how the numbers change when armor is considered to let's calculate this too using a target with 2597 armor.

1264753.86 / 2597 = 487

1418981.64 / 2597 = 546.39

1990599.49 / 2597 = 766.5

Masterwork vs Rare

The same procedure as before but different stats now.

Item Name Power Precision Ferocity
Berserker's Masquerade Mantle 53 38 38
Berserker's Banded Pauldrons of Infiltration 40 28 28
Berserker's Panded Coat of Grenth 119 85 85
Berserker's Banded Gauntlets of Infiltration 40 28 28
Berserker's Banded Legs of Lyssa 79 57 57
Berserker's Banded Greaves of the Eagle 40 28 28
Berserker's Iron Axe of Accuracy 106 75 75
Berserker's Iron Axe of Accuracy 106 75 75
Berserker's Ring 79 57 57
Berserker's Ring 79 57 57
Berserker's Amulet 106 75 75
Ruby Mithril Earring 66 47 47
Ruby Mithril Earring 66 47 47
Total 979 697 697

The weapon damage is 759 to 928. On average that's (928 - 759) / 2 + 759 = 843.5. Calculating the damage and comparing it we get:

Masterwork:
784 * 1905 * (1 + ((646 / 21 / 100) + 0.05) * ((646 / 15 / 100) + 0.5)) = 1990599.49

Rare:
843.5 * 1979 * (1 + ((697 / 21 / 100) + 0.05) * ((697 / 15 / 100) + 0.5)) = 2284269.66

So the damage has increased by (2284269.66 / 1990599.49) - 1 = 0.1475 or 14.75%.

Damage vs Armored Enemies

Comparing the damage done on armored enemies we get these results:

1990599.49 / 2597 = 766.5

2284269.66 / 2597 = 879.58

Rare vs Exotic

And for the last time for today the same procedure.

Item Name Power Precision Ferocity
Berserker's Draconic Helm 60 43 43
Berserker's Draconic Pauldrons 45 32 32
Berserker's Draconic Coat 134 96 96
Berserker's Draconic Gauntlets 45 32 32
Berserker's Draconic Legs 90 64 64
Berserker's Draconic Boots 45 32 32
Mystic Battleaxe 120 85 85
Mystic Battleaxe 120 85 85
Berserker's Ring 90 64 64
Berserker's Ring 90 64 64
Berserker's Amulet 120 85 85
Ruby Orichalcum Earring75 53 53
Ruby Orichalcum Earring 75 53 53
Prototype Fractal Capacitor 30 21 21
Total (without back) 1109 788 788
Total (with back) 1139 809 809

Exotic weapons have a damage range of 857 to 1048 which means their average is at (1048 - 857) / 2 + 857 = 952.5. Calculating the last comparison we get:

Rare:
843.5 * 1979 * (1 + ((697 / 21 / 100) + 0.05) * ((697 / 15 / 100) + 0.5)) = 2284269.66

Exotic:
952.5 * 2109 * (1 + ((788 / 21 / 100) + 0.05) * ((788 / 15 / 100) + 0.5)) = 2884690.79

With backpack:
952.5 * 2139 * (1 + ((809 / 21 / 100) + 0.05) * ((809 / 15 / 100) + 0.5)) = 2959029.46

So the damage increase without backpack is (2884690.79 / 2284269.66) - 1 = 0.2629 or 26.29% and with backpack it's (2959029.46 / 2284269.66) - 1 = 0.2954 or 29.54%

Damage vs Armored Enemies

And the last time let's check our damage against those pesky enemies that have 2597 armor.

2284269.66 / 2597 = 879.58

2884690.79 / 2597 = 1110.78

2959029.46 / 2597 = 1139.40

Conclusion

Got through almost all tiers. The last quality missing is ascended but that's another topic. So now we know that the jump from fine to masterwork quality gave us the most damage increase. Of course, since we got access to additional items. If we ignore that fact the biggest jump was from basic to fine. So overall, we see the highest jumps at the lower quality tiers though the jump from rare to exotic is higher than the jumps in the middle. Another thing we notice is that the jumps between qualities are not equal. They also seem random jumping to higher or lower numbers. We could conclude that there's no formula to calculate these values in the background. Another proof for this would be that if you count all your stats and compare the result with the number in the tooltip there's no rounding error. So compared to WildStar these numbers seem to have no floating-point part.

Last but not least let's get the total damage increase. To calculate this we multiply each damage increase with the factor of one.

1.3852 * 1.5739 * 1.1475 * 1.2629 = 3.1594

This means upgrading from basic to exotic you deal a little more than 3 times as much damage. Your damage increased by 315.94% - 100% = 215.94%.

And next week we'll compare the exotic and ascended gear.

02 February 2018

Guild Wars 2: Damage Increase Part 1: Gear

The difference between exotic gear and ascended gear is often called out to be 10%. This got me curious. So let's check out the damage increase of all rarities. We'll start with physical or direct damage first as it's more commonly calculated.

How to Calculate the Difference

So to get a difference we need two numbers. Let's check out two full Berserker equipped of the same type and level but with different rarities. Rarities in Guild Wars 2 are categorized into
  • Basic
  • Fine
  • Masterwork
  • Rare
  • Exotic
  • Ascended
  • Legendary
To do this we need to sum up all the items. There are 14 item slots available with some extra that replace others. For example, you can either have one weapon or two weapons if you switch weapons your previous ones don't count until you swap back. Same with underwater equip. Your underwater breather replaces your head item when underwater, while your underwater weapons replace your normal weapons.

Summing Up the Stats

So let's sum the stats up nice and cozy through the help of a table. We're starting off with the basic white gear with Berserker stats, level 80, of course. Unfortunately, some basic items don't have a level 80 type so we'll go with what we have/can get.

Item Name Power Precision Ferocity
Berserker's Apprentice Band 36 26 26
Berserker's Apprentice Shoulders 27 19 19
Berserker's Apprentice Coat 81 58 58
Berserker's Apprentice Gloves 27 19 19
Berserker's Apprentice Pants 54 39 39
Berserker's Apprentice Shoes 27 19 19
Berserker's Axe 72 52 52
Berserker's Axe 72 52 52
Total 396 284 284

Power will stay the same but precision and ferocity are converted into their corresponding attributes. To convert precision to critical chance we need to divide it through 21 which means through our equip we get 284 / 21 = 13.52%. For the conversion from ferocity to critical damage, 15 ferocity equals 1% critical damage. Thus with 284 ferocity we get 284 / 15 = 18.93% critical damage. This means we get 396 power, 13.52% critical chance and 18.93% critical damage. Let's check what we get from the next rarity using another table, of course. There are accessories now but not with Berserker stats so let's still leave them out. Besides we didn't have them at basic so... yeah.

Item Name Power Precision Ferocity
Berserker's Cabalist Hood 45 32 32
Berserker's Cabalist Shoulders 34 24 24
Berserker's Cabalist Coat 102 73 73
Berserker's Cabalist Gloves 34 24 24
Berserker's Cabalist Legs 68 48 48
Berserker's Cabalist Boots 34 24 24
Berserker's Iron Axe 91 65 65
Berserker's Iron Axe 91 65 65
Total 499 355 355

Our power increased by (499 / 396) - 1 = 26.01% and the secondary stats precision and ferocity increased by (355 / 284) - 1 = 25%. Anyways we gain 355 / 21 = 16.90% critical chance while our critical damage increases by 355 / 15 = 23.67% through the gear. We get 499 power as well.

Damage Calculation in Guild Wars 2

To calculate damage in Guild Wars 2 the following formula is used:
damage = (weaponStrength * power * skillCoEfficient) / targetArmor
Since we're comparing only the difference in stats skill co-efficient and the armor of our target will be constant. So we can ignore those factors:
damage = (weaponStrength * power * 1) / 1
For the weapon strength, we will assume the average. The other factors such as critical chance and critical damage can be multiplied with this value. So we get this formula now:
avgDamage = weapon Strength * power * (1 + critical chance * critical damage - 1)
avgDamage stands for average damage;

If you don't know how this formula came to check out my post about damage calculation in WildStar.

Last but not least we need to know the base values. With no equip how much stats do we start with?
We're only looking at the stats relevant to our calculation so that's critical chance and precision due to the relation, critical damage, and ferocity due to the relation and power. The power starts at 1000. Precision starts at 1000 too. However, 895 of this precision is subtracted. So we have 1000 - 895 = 105 left. This rest is then 105 / 21 = 5% critical chance. For ferocity, it starts at zero. This makes it easier for us. However critical damage starts with 150%.

Keeping this in mind our formula would look more like this

avgdmg = weaponStrengthAvg * power * (1 + ((prec / 21 / 100) + 0.05) * ((fero / 15 / 100) + 0.5))
dmg stands for damage; weaponStrengthAvg stands for the average weapon strength; prec stands for precision; fero stands for ferocity;

or

avgDmg = weaponStrengthAverage * power * (critical hit chance + 0.05) * (1.5 + critical damage)
avgDmg stands for average damage; weaponStrengthAverage stands for the average weapon strength;

Now before we start calculating we need to check the weapon strength. The Berserker's Axe has a weapon strength from 522 to 638. The average of that is (638 - 522) / 2 + 522 = 580. For our Berserker's Iron Axe it is 654 to 799. The average of this is (799 - 654) / 2 + 654 = 726.5.

First Comparison

All we have to do now is fill our formula.

Basic damage
580 * 1396 * (1 + ((284 / 21 / 100) + 0.05) * ((284 / 15 / 100) + 0.5)) = 913068.68

Fine damage
726.5 * 1499 * (1+ ((355 / 21 / 100) + 0.05) * ((355 / 15 / 100) + 0.5)) = 1264753.86

These numbers look big because this is the average damage you do to a small white bug. Those bugs as you may have seen them have no armor. With no armor, the damage is respectively high. If you want some better numbers you can divide these by 1967 to get your average damage on a player with ascended light armor and no toughness.

To know how much more damage we do we can simply divide the changed number through the previous one. We want to switch from basic to fine equipment so let's divide the newer 1264753.86 damage through the old one 913068.68. Doing this we get a factor of 1264753.86 / 913068.68 = 1.3852. This means we do 138.52% damage now. If we subtract one or 100% from this we get the actual increase which is 38.52% or 0.3852.

Actually, let's check out the damage against the previously described player.

913068.68 / 1967 = 464.19
1264753.86 / 1967 = 642.99

Not so much anymore.

Done for Now

You, I'd love to continue this but I can't spend more than two hours a day on gathering data, writing this post and doing the calculation. I want to do other things as well in my life. :P So I'll have to split this post. Though now that a lot is clarified, defined and done I can focus on the calculation. So I'll probably be able to do like 2 or 3 comparisons per post from now on. We have 4 more comparisons to do.

01 February 2018

Speedrunning Friendly Game Design

Speedrunning is a great thing. It takes a lot of dedication, experience, practice, and knowledge to do fast speed runs with record times and it's always enjoyable to watch the GDQ (Games Done Quick) or AGDQ (Awesome Games Done Quick) there are tons of people who view them. Additionally, some speedrunners upload Youtube videos or stream the games they speed run.

Speed Running For Publicity

So with no doubt tons of people watch speed runs, which in return means if there are speed runs for your games more people will see it and maybe more people will play it. So having speed runners pick it up is a good thing. However, without paying speedrunners to pick up the game and speed run it you need to motivate them passively. The best way to do this would be to make your own speed run yourself. Unfortunately in most cases even if it's your own game you might not have what it takes to make a speed run. So we need to motivate other people to do it.

Preferred Games

Speedrunners prefer certain games to others for speedrunning. Watching speedrunners, taking a short look and using some common sense you can determine the factors that are needed for this and you can implement them to a certain degree into your game. So let's look at those factors from a speed runners point of view. Now I must say I'm not a speedrunner myself, I'm just a speedrunning enthusiast who tried back in the old days. Though the self-doubt of playing perfectly for up to hours to get the best times is quite discouraging. I know there are segmented runs too but getting near world record times. I doubt I'll be able to manage that without giving up something else.

Important Factors For Speed Running

As the name is saying it already: Speedrunning includes speed and running. It's about beating the game as quickly as possible. This means that situations where you have to wait for the game to continue to halt your progress and slow the runs down some times even immensely. Examples for this would be 
  • levels that scroll without allowing the player to leave the area. 
  • cut scenes that can't be skipped
Speed runs are often about the feel. If someone does a speed run they're not sneaking around slowly and carefully. Speedrunning is all about fast-paced progress. It's about running if.. you can call the fastest way to move through the game running as this most often does not describe whatever's the player character doing. Anyways what I want to get to next is the capability of movement. The more capability and maybe even combo's there is, the better. A good example of this is the Super Mario 64 series. In Super Mario 64 you could
jump, double jump, triple jump, dive, long jump, kick jump which also produces negative momentum when done against a wall side jump and wall jump
In Super Mario Sunshine the basic abilities weren't as good but you now got
jump, double jump, triple jump, dive, long jump, kick jump which also produces negative momentum when done against a wall, side jump, wall jump, spin jump, hover and tummy sliding
In Super Mario Galaxy we can now spin in air to keep us in the air by a little longer but therefor we lose a little of our arsenal. We're now left with
jump, double jump, triple jump, dive, long jump, kick jump which also produces negative momentum when done against a wall, side jump, spin in air and wall jump
With Mario Odyssey, we now can roll as well and some more tricks thanks to cappy
jump, double jump, triple jump, dive, long jump, kick jump, which also produces negative momentum when done against a wall, side jump, wall jump, throw and dive on cappy, jump off of cappy, dive again
If you give people an arsenal of movement abilities for all kinds of situations, speedrunners will most likely love it. So we've got movement and halts in games. With these both, you're pretty safe already. Though there's one more thing you can't account for.

Bugs & Glitches

 Sometimes it happens, that a wall or collision isn't set correctly or a loading zone can be triggered from somewhere else. Some times even heavier mistakes happen, like building nearly infinite momentum, wrong warping, and overflowing and storage. Let's go through these names as you should know what they mean as a game designer but as a gamer too.

INFINITE MOMENTUM Usually when stopping any motion or actions through controls the character should return to zero momentum relatively fast. However, sometimes there's an unintended way to gain more momentum when you lose, allowing you to build infinitely much of it. This can be used to accumulate a speed that ignores the collision of walls allowing you to skip parts of the game.

LOADING ZONE Describes an area that triggers the loading of another level or scene when the player enters it.

WRONG WARPING Wrong warping describes the technique to teleport or load a certain area of the game that was not intended to be loaded by the respective loading zone. For example, if you enter the level 1-2 warp zone from Super Mario Brothers by bugging yourself through the bricks instead of jumping over the pipe you can load the level -1 which is not supposed to be in the game. Not really helpful but I think you get the idea behind this.

OVERFLOWING Overflowing, as well as underflowing for that matter, describe the numbers to jump to their opposite counterparts. For example, if we say we have 2000000 points and we continue to get points we end up with -2000000 points. What happens here is numbers - especially in older games - are capped to a certain degree. This cap is defined by the variable type used. For example, an 8-bit Integer holds the numbers from almost -2^7 to nearly 2^7. Why exactly this much? The Integer has 8-bits the first one is used to define whether it's a positive or negative Integer. This means the Integer is described as signed Integer, the opposite would be unsigned Integer which has 8 bits to represent the number and thus goes from 0 to 2^8-1 = 255. Our signed Integer, however, goes from -127 to 127. If we happen to count up in an 8-bit Integer variable once we reach 127 one more count will make it turn to -127, an overflow. If we count down to -127 one more step would make us go to 127, an underflow.

STORAGE Storage can describe many things, obviously since the name is no generic. In the end, it comes down to the same thing. You're trying to create a situation where the game takes a game object or something else as a placeholder ending up to implement this stored object once the placeholder is called. It sounds complicated and it's hard to explain trying to stay generic. There are two strategies for storage I know in speed runs or games. One of them is the storage of items in Super Mario World. This is most famous for the videos where people literally rewrite the game code while playing or simply store yourself another feather in case of need. Er.. yes. The other one is scene storage. The idea behind this is that you want to trigger a scene at the same moment another option could be possible, like triggering an object to move your character, triggering another scene, leaving the area or something like that. What happens here is that the scene hasn't finished playing to my knowledge the next scene you see now is going to be stored. For example, some games allow you to watch all the scenes of the game, as well as the final boss scene. So if you watch the final boss scene it's now stored. Once you get back to your normal game and you continue where the normal next scene would've played it might get overwritten by the stored one placing you wherever that one plays. In our example at the final boss fight. I might not have explained it 100% correctly but I'm assuming you get the point.

That's Nice And All

Yeah, it is, but the point I want to make here is, don't patch certain glitches and bugs out. People love certain bugs and glitches and they make for their own category in speedrunning. Most commonly known as any% run. Not to be confused with any% glitchless runs.

Random Number Generators

RNG or RNGesus as people call it describes something in games people can't influence. If you can't plan for a situation that makes it hard to predict and work within games. This means that games with a lot of random number generators and luck - especially if needed in the late game - are less likely to be picked for a speed run. This does, however, not count for roguelikes. Since roguelikes are all about generated content and feeling unique with each run speedrunners know what to kind of expect from these. Though the option to allow the player to pick a seed will be most likely preferred.

So How Should I Design My Game?

Well, it's simple. If you want it to be speedrunning friendly, make sure scenes, talking and such can be skipped either completely or after the first run through. Make sure the player has a set of tools at hand that allows him to move from point A to point B, even vertically if your game is about that. Try to avoid too much RNG in the late game if possible and leave certain glitches in if they bring value to the speedrunning community without breaking your game too much. Just look at games that have been a speed run before and at speed runners commentary to certain speed runs. I mean why wouldn't one wanna watch these? They're awesome too much. TAS (tool-assisted speed run) or not TAS doesn't matter.

About Me

My photo
I'm a M.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.