25 May 2018

Balancing in Terraria: The Is-State (Part 2)

A few days ago I made a blog post where I went through the mind and thoughts that go and might have gone through the discussion of balancing. We came up with how we wanna put our classes. Now it would be interesting how far we are off. To determine this we have to analyze Terraria's balance.

Analyzing the Balancing

The factors we looked at when balancing were
  • How is the class played
  • How much defense should it have
  • How much damage should it have
So let's look at the defense and damage that Terraria provides us.

PyPlot of Terraria's defense per tier per class
To do this I looked at the defense of each armor for each of the four implemented classes and plotted these numbers using Python and the MatPlotLib module. It does not seem to plot but the x-axis shows the tiers I used. These tiers are: 0 - fresh game; 1 - brain of Cthulu / eater of worlds defeated; 2 - Hell reached; 3 - cobalt mined; 4 - Mythril anvil; 5 - Adamantite forge; 6 - mechanical bosses defeated; 7 - chlorophyte farmed; 8 - Plantera defeated; 9 - golem defeated; 10 - lunar event + Moonlord defeated. To run a little over the numbers the end-game armors that are craftable using Luminate once the end boss the "Moonlord" has been defeated have 78 defense on the melee armor, 68 defense on the range armor, 46 defense on the magic armor and 38 defense on the summon armor. generally, you can see the trend to be that the relation melee > range > magic > summon can be found here again. Which goes perfectly with what we assumed to be the case.


The next information we need to look into would be the damage. Now calculation the damage is a bit tough due to the following reason:
  • Weapon damage numbers are affected by weapons bonuses
  • We have to calculate in critical strike damage and critical strike chance
  • Some items hit multiple times
  • There are buffs provided by the armor set bonus that affects the values
  • Items may deal a lot of damage but have a huge use time or cooldown
Due to all these factors, we need to sit down and actually test the items. Though this has proven to be difficult too due to these reasons:
  • Attacking a target dummy may not provide buffs
  • Target dummies are not affected by homing attacks
  • Target dummies are not attacked by minions
And yet this is our best bet.

Preparing and Running the DPS Test

To prepare the DPS tests I downloaded a mod called CheatSheet, to allow me to get any item in the game without farming it first. I've created a new character and a new map and gave myself the best items available at that moment to my knowledge. I must also admit that I used the star cannon and the coin gun (with gold ammunition). Tests that can be done on a target dummy were done so. I'm assuming only one target dummy that is hit with no rebound. We're assuming a single target flying boss for these. I know technically there should be extra tests for multiple target and etc. but this should do for a simple comparison since single target DPS is required for the most bosses. any other tests for minion masters and magic buffs were done on bosses with only one hitbox. Additionally, I only changed armor and weapons as well as specific ammunition and necessary accessories like the mana flower or multiple worm scarfs (to negate boss damage). The damage number was guessed given the number shown by the in-game item "DPS meter". An approximate number should not do well then comparing the exact math but for a graph to look at it's enough.

PyPlot of Terraria's damage done by classes per tier
Thus due to the circumstances, the damage numbers may run wild if you try it yourself but it should be near with a few exceptions. Anyways as you can see in the graph we have a relation of magic > range > melee = summon.
In comparison our idea of balancing was magic > summon > range > melee. Now we were right with magic being top, though summon damage is much lower than range or melee in the actual game. I must say that I did not calculate any other items. This was just the plain minion damage. If the minion master would use the other classes items his damage would increase but even then it would not be higher than range damage.

Generally, though all the classes seem to be very similar during the progress for the tiers only splitting significantly after the Moonlord. The only difference is the range class which has a huge damage boost when using the star cannon, which requires farming stars during the night and the coin gun which in the damage tests consumes your gold. both these resources should be easily achievable when the time is put into it. Honestly, I am disappointed by the early mage damage and the overall summoner damage in comparison to the survivability.

Conclusion

So, in the end, it turns out we were right with the defense but wrong with the damage.
Now due to the lack of defense on some classes and the low damage output of them, it doesn't surprise me anymore that I preferred to play tanky melee all the time. You deal almost the same amount of damage compared to the others. Of course, there's no 20% more damage potion for melee or there is less damage increasing accessories for melee, but with that defense difference, I don't know.

I guess in our modding plan we need to mush the damage of a few classes. :P


22 May 2018

Balancing in Terraria - Part 1

Balancing in video games is a delicate topic. I've been playing Terraria lot lately - especially modded. I've also started to create a mod with a friend of mine and we're planning on adding new classes and new end-game progression, which requires balancing as well.

First: What is Terraria?

Before going into details let's inform everyone what Terraria is. I don't want to go deep into detail on this one so let's fill you in this way: Terraria can be considered a 2D version of Minecraft in a limited world with a higher focus on equipment progression, much more underground layers and an adventure type of feel with a few elements of hack and slash sprinkled in. At least that's my definition of Terraria.

Basically you start off in a world with a copper pickaxe, short sword, and axe and you have to get new resources, defeat bosses to get better equipment, like mining utilities, armor, weapons and so forth, which increase your stats like maximum health, mana, damage, critical strike chance, critical strike damage, attack speed, life regeneration and more. Of course, you can build houses and other stuff though more enemies are traveling the world than in games like Minecraft, so your building may be interrupted by a horde of zombies and flying eyes at night or slimes at the day.

The Classes

Classes in Terraria are not chosen at the character creation. Instead, they are determined by the items, armor and other equipment you use. Playing Terraria you may come across three to five classes. These classes are categorized by the damage types and the boost given in the game.
  • Melee Damage
  • Range Damage
  • Magic Damage
  • Summon Damage
  • Thrown Damage
Though, you may find some inconsistency between classes. This is because the summon class was added later in development and the thrown damage class was discontinued or abandoned. The reason for the latter is the similarity to range. The former is noticeable as there are hardly any - if at all - summon items in the early game.

Balancing Procedure

So we have five classes now and the easiest way to balance these would be to make them all equal. Ah, that would be too simple. I said balancing is a delicate thing. If you make every class equal, good job you balanced it mathematically, but it's no fun. Games are all about fun, even if it's in weird ways sometimes. Well, our classes should be different. Going by common logic and our three main classes we have a melee that most likely needs to be near enemies and bosses most of the time a ranger that stays at a distance and has to aim whilst consuming ammunition and last but not least a mage or wizard that uses mid to far distance high damage weapons whilst consuming a rechargeable resource.

Applying the Definition

Step 1: Create a Basic Relationship of Defense

By the definition of our melee class, they'll need a lot of defense as they're near the opponent and most likely to get hit. In comparison, the magic and range classes can avoid any contact with the opponent if their maneuverability is good so they don't need that much defense. So, let's check our current state.

Defense: Melee > Range = Magic
Damage: Melee = Range = Magic

Step 2: Build on the Basic Relationship

Another thing we defined is that magic damage is the highest of all in nearly all games, unfortunately, this comes at a cost. For a mage or wizard to be strong they need to be able to use their spells and mana most efficiently. This requires certain clothing, that is light and can be easily imbued. At least that's a common belief, so, let's go with this! We increase the damage of the magic class, decreasing the defense at the same time to keep it balanced.

Also, we're putting range above melee as range has it harder to hit the enemy, due to aiming.
 Our new state is:

Defense: Melee > Range > Magic
Damage: Magic > Range > Melee

Keep in mind this is just an approximation. Even though balancing via formulas and calculation isn't all, it still helps a lot when balancing details.

Adding the Other Two Classes

Step 3: Adding Our Thrown Class

Don't forget about the thrown and the summon class! These are very specific so we have to go with what is in Terraria to get an idea of how they were planned or implemented. The thrown class uses consumables that can be thrown and ammunition consuming items to throw a gravity affected object. Additionally, there are thrown weapons that have been assigned to the melee class instead like infinite daggers to throw, lances and boomerangs and similar. Something noticeable here is that all thrown items do not allow for a distance that's as far as the range class. This limit plays a huge role. We're dealing with a mid-range class. As such they need either more damage to compensate for damage taken than the range class or more defense. Giving them increased damage instead of defense allows for a hit and run styled gameplay that may match something like a ninja, so let's go with that.

With our relationship updated:

Defense: Melee > Range > Thrown > Magic
Damage: Magic > Thrown > Range > Melee

Step 4: Adding Our Summon Class

The way the summoning class has been introduced into Terraria makes it tedious to balance. A summoner uses the same resource as a mage but only once per summon - on the same note: Summons have no time limit, they age until you die or dispel it by right-clicking. They can summon up to 9 or 11 minions depending on the platform you play on and whether or not you use buffs. The problem here is the balancing of the armor. Let's illustrate the issue mathematically...

Natural Diminish Returns on Summoner Minions
x-Axis: Number of MInions
y-Axis: Damage increase in %
If you have a summon weapon that deals 24 damage and you summon one minion you deal 100% damage. That's the base damage. If you summon another minion you have two that both deal 24 damage so in total 48. That's 200% - your damage has been doubled. Now with the next minion, you deal an additional 24 damage, that's 3 * 24 = 72 damage. This is 300% of the damage compared to one minion but it's only a damage increase of 50% since we had 48 damage with two and got only half, 24 damage, with the third. 

This behavior should be familiar to people who know this or read this blog for a longer time. The behavior is called Natural Diminishing Returns. Basically the more you get the harder it is to keep on doubling the effect. I'm not going into detail on this here, but the graph to the left shows the behavior.

By the way, the point where the increase is half of the 100% damage you should check if you find any damage bonuses that give higher damage increase. For example, if you have four minions your next minion will increase your damage by 6.25%. Some armors give nearly or more than that. 

Another factor is that while the minions do the job the summoner can use other weapons in the meantime. This further increases the damage. At the same time since those minions are taking care of the enemy automatically, the summoner can focus on dodging and avoiding attacks. Thus they don't need as much defense as the magic, melee, ranged and thrown classes need. Additionally, due to the advantages, I mentioned here the damage should be far lower per single minion. The total damage should be lower than the magic class, as they aren't forced to embrace the enemy, but with the low armor, it should be higher than the rangers. Also, the minion attack range plays a role here. From what I've seen in Terraria it is about mid-range.

Phew, so, this gives us this relationship:

Defense: Melee > Range > Thrown > Magic > Summon
Damage: Magic > Summon > Thrown > Range > Melee

Preview

Now we've got the basic relation between defense and damage of the classes done. In the next post, we're going to compare the actual in-game defense and damage to check how the balancing has been done in-game and where breakpoints and power spikes are hidden. Additionally, we're gonna compare and assume where the thrown and beginning of the summon class should be.

Until then, GreenyNeko, out.



14 May 2018

Can Power Levels in Anime and Games Be Applied to Real Life?

I got the anime "The Seven Deadly Sins" or "Nanatsu no Taizai" suggested by a friend and I really enjoy it up to the second season episode 7. I haven't watched it further yet. However, something I noticed is that some of the characters can read the power level of others and even break it down into the stats. I know that games use numbers to determine the power level as well, but can these be applied to real life?

Progression in Real Life

Everyone knows that if you do a certain thing your experience and skill doing that thing increases. For example, if you do push-ups every day until your limit, your limit increases. At first, you might only be able to get five. Soon you get ten in a row and at some point, the number increases to 15 and so forth. Another example would be playing video games. At first you can't beat the first boss of Dark Souls, however, if you replay the game from the beginning it will be much easier even if you've forgotten the mechanics. Even picking up another game similar to dark souls or even Dark Souls II you would play on a higher skill level than before. Okay, enough examples. So in real life, we're able to improve our abilities through training and practice, and that works for any skills, from pure strength to knowledge or intelligence to reaction.

Where Video Game Stats Came From

So over time, we have all these games with hidden or visible stats that range from common MMORPG or RPG stats like strength, intelligence, critical hit chance and the like to jump height, run speed or endurance regeneration. These stats weren't just a random idea someone had at some point in the evolution of gaming. No, they came from real life. As mentioned before doing something rewards you with experience in the task you did, if you gain enough experience you make higher jumps in your skill. These are represented in video games as levels. They can also be seen in real life when learning languages for example, there are different levels of difficulty rewarded like the foreign Japanese test. The JLPT (Japanese-Language Proficiency Test) has five levels going from N5 to N1.
So stats we see in video games actually come from real life to represent these concepts in a mathematical form that can be used in games. Don't forget that video games broken down consist only of logic and mathematics: technology.

Stats in Animes

So whether anime stats came from video games or real life is an interesting question at this point, though, it does boil down to the same thing in the end. Obviously, animes that play in a video game world in one or the other way implement stats. There are however animes that don't play in a video game worlds like Dragon Ball Z, The Seven Deadly Sins, etc.. In the end it comes to the same idea: how can we represent skills and comparison of skills in a simple easy manner, such as an equation.

There's a Scheme

If you didn't notice it yet, there's a scheme here. We're taking something we know from real life and translating it so we can use it with math and logic. That's the same thing we do in physics. We take math to represent features from the world in a logic way we can comprehend. We've created this mathematical system called physics, to predict and understand how the world works and what the mechanics are. We create such systems to create our games or to make our animes work in a way that one might think the virtual or fantasy worlds actually exist. Unfortunately, math isn't a given thing that exists, it's a concept that was created millennia ago to comprehend simple things in the world as defining an amount, a weight and the fundamentals of the world by now. There are still a ton of theories in mathematics that haven't been able to apply to physics yet and still, we were able to get until quantum physics.

What About Magic or Spirit Stats?

In the "The Seven Deadly Sins" anime the power level is defined by the attributes strength, magic, and spirit. Strength would be no problem to measure. We can measure strength with our physics formulas to get the force used (F = m * a force equals mass times acceleration). How do you measure spirit and magic though? While I can't answer this question as of now I can say this...

Some wizards out there actually create formulas to calculate these things but those formulas have no scale. They don't even use any numbers as there is no scaling for it yet. One of those wizards is Frater V.D... In one of his books "Hohe Schule der Magie" (Engl. "High School of Magic"), he explained a few things using formulas and variables so the relationship between each of the variables can be understood easier.

Does That Mean Those Formulas Don't Apply?

Don't worry they're not only for show, quite the opposite. As I already mentioned, even though they have been created to show the relationship between different factors without a scale you can't use them for calculation. If you happen to have a scale however you will be able to use them for calculation. The problem here is if you create a scale that doesn't fit with the scales and units used in physics you might end up in a compatibility issue between both and from my experience and data I've collected so far there is a connection between physics and magic. So to be able to apply the power levels and stats from games and animes to real life we need to be able to fill up the gap between magic, spirit, and physics. Luckily quantum physics might be another step further to fill that gap.

Also, keep in mind like it is said in "The Seven Deadly Sins", the stats are not static, they change depending on different factors, like equipment, your mind, your will, etc..

So keep on leveling and perfecting your skills and push yourself! (though not too much, please D:)

08 May 2018

Game Genre: Metroidvania

Metroidvania what a weird name for a genre. Well, at least if you're not familiar with it as it all makes sense once you understand it.

So We Call It Metroidvania

The name of this genre originated from the  NES game Metroid and the Playstation game Castlevania: Symphony of the Night. By taking the name of the first game and the removing the castle part from the latter we get our genre name. Similar to how the name of this genre is created the genre categorizes games.

Features In Metroid

Metroid games are jump 'n' run games that include inspiration from adventure games. They consist of a big interconnected world with abilities and power-ups or upgrades as well as bosses lying around. The abilities, power-ups, and upgrades allow you to progress further in the game and it's not uncommon that you need to backtrack. Additionally, bosses and standard enemies require you to have certain abilities to defeat them easier or at all.

Features In Castlevania

Castlevania: Symphony of the Night has you explore Dracula's castle, a big interconnected world as well. There are items, power-ups, upgrades, and abilities here as well, same with bosses. The upgrades and abilities are required to progress further in the game as well. Backtracking is part of this game as well. So, basically, this version of Castlevania is the same as Metroid... except there's more. Compared to Metroid, Castlevania includes RPG elements, such as stats and leveling.

The Fusion

So, the combination of both, the Metroidvania, is a jump 'n' run adventure game that consists of big interconnected worlds that allow you to semi-freely explore it, but require you to backtrack once you get a new ability to find new paths or secrets that will lead to new abilities. Additionally, several bosses are scattered around that either halt your progress by being in your way or defeating them gives you an item that is required.

Modern Game Example

One of the modern Metroidvanias is Hollow Knight. It was nominated four times and its rating is between 86%-100%, depending on the reviewer. Hollow Knight, like the other two games mentioned here, uses a big interconnected world map with abilities, power-ups, and bosses scattered around. Backtracking is not uncommon in Hollow Knight either and while none of the abilities are required for the bosses they do indeed make it easier. Compared to it's Castlevania counterpart it does not contain RPG elements such as leveling and multiple stats though.

Is Banjo & Tooie a Metroidvania or a Collect-a-thon?

When searching for 3D Metroidvanias (since typically Metroidvanias are 2D games) I came upon a post where people called Banjo & Tooie a 3D Metroidvania. With the earlier post about Collect-a-thons and this post about Metroidvanias, we should be able to answer that question.

Does It Have a Big Connected Map?

Banjo & Tooie has multiple hub worlds that are connected with each other and they are connected to single levels with each having its own theme. These single levels are however partially connected to each other as well. Now it depends on where you draw the line for big interconnected worlds since there is a difference here compared to the other games I've mentioned.

Does It Contain Backtracking?

This question I can definitely answer with a yes.  Something I loved about Banjo & Kazooie was, if you go into a world you can 100% it. This is not the case in Banjo & Tooie. There were collectibles you couldn't reach without having been in another world or having unlocked a certain ability.

Are Abilities Scattered Throughout the World With Different Means?

What I mean by this is... if you can buy some abilities, find some lying around, find some in a chest or get some from a boss then this matches the other Metroidvanias. This is not the case in Banjo & Tooie all abilities are unlocked by buying or using collectibles. Which makes sense for Collect-a-thons.

What's the Primary Objective For Progress?

Metroidvanias primary objective consists of challenging the player having him rise with the challenge and explore the world. Collect-a-thons sole purpose consists of finding and collecting objects and progress is tied to it. Now, of course, you might end up exploring the world in a Collect-a-thon but the purpose is different. You're exploring in hope to find some kind of collectible. In Metroidvanias you explore to find new paths and abilities. In Banjo & Tooie the only way to progress through the game is by getting jigsaw pieces to unlock new levels to get more jigsaw pieces to get more levels until the last boss.

Conclusion

As I mentioned whether or not you consider Banjo & Tooie as a Metroidvania depends on where you draw the line, however going through these questions I personally would say, it is not.


Liked the post? Noticed an error? Wanna discuss the content or leave a comment*? You can join or check into the discord to do so! (*Note: Comments are disabled to avoid saving user data on this website.)
>> Join Discord

About Me

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