Staredit Network > Forums > General StarCraft > Topic: Game Balance
Game Balance
Jul 27 2024, 1:54 pm
By: MetalGear  

Jul 27 2024, 1:54 pm MetalGear Post #1



www..(+) Balance Guide (-)
wwwwwww...Written by MetalGear

wwwwwwwOverview

Over the last 18 months, I have studied balancing
and math. Trying to figure out the eternal codex
(solution manual) to all Game Design building
bricks.



ww..Three basic components

All fighters in every game are made of three basic
elements:
Attack, Defence, and Run speed.

It took me a while to figure out the types of
relationships between them.



wwwwwwRelationships

Defence or HP in other words is the primary divider
of all 3 elements, because without HP, the unit does
NOT
exist .

Attack is the second component to order because
it has a direct relationship with
Defence in its ability
to deal
hit points.

Run speed is the third component and is tricky to
determine its value (mainly because its effects are
situational).



wwwwwwww.Time

Between the relationship of HP and Attack is the
dimension of
time. There is NO exact rule on the
mechanics of
time measure (like calculating how
long it takes to kill a unit of the same properties)
because the
time value is purely psychological;
its function is to set the
pace for the game.

Example:

The values (cost) of HP and Attack do not matter.
But the cost of
HP needs to be less than Attack
to create the measure of time.

Cost of 1 HP: 1
Cost of 1 damage (per second): 8

Let's create a Marine with these statistics:

HP: 100 (value: 100)
Damage (per second): 12.5 (value: 100)

Equal values (100) have been assigned to HP
and Attack (however this is not necessary). If
2 Marines were created with these values, it
would take them
8 seconds to kill each other.

If the cost of
HP was changed to 0.5, this
would increase the Marine's hit points from

100 to 200 and slow the pace of the game
(taking 16 seconds to kill rather than 8).



wwwwRevelation in Math

Suppose you have a super unit that is worth
200 (combined value of HP + attack), and 2
basic units
that are worth 100 each.

Your objective is to make the super unit oppose
the 2 basic units and make them die at basically
the same time (to balance their equal values).


Experiment:

Your expectation would be to divide both values
(HP + attack) by half for the 2 basic units, right?

Let's see:

Super unit:
400 HP / 80 damage
Basic unit: 200 HP / 40 damage

Premise #1

How long does it take a super unit to kill a basic
unit?


200 (basic unit HP) / 80 (super unit damage)
=
2.5

The super unit kills a basic unit in 2.5 seconds .

Premise #2

How much damage will 2 basic units deal to
the super unit in 5 seconds?

First basic unit = 2.5 seconds
Second basic unit = 5 seconds


7.5 (seconds of basic damage)
x
40 (basic damage)
=
300

The basic units deal 300 damage, leaving the
super unit with
100 (25%) HP.

Conclusion

The super unit is more powerful than the basic
units in a fight (even though the values were
distributed evenly).


Solution

We're looking at the values incorrectly.

Presuming that the values are the same for HP
and attack, then
HP and Attack should both be
calculated at
50%, forming a total unit
composition of 100%.

Therefore, keeping in mind that HP is worth 50%
of the unit composition, then if the HP is reduced
by half (as we did with the 2 basic units), we need
to take the value 50 and reduce it to 25. Now the
unit composition = 75% (25% HP / 50% damage).

This explains the super unit being left with 25%
HP.

To balance the basic units, we need to bring the
75% unit composition up to 100%.

Take the 50% damage component and multiply
by
1.5 to make a 25% / 75% composition factor.

Now the units are balanced, with the basic units
dealing
60 damage (50% value increase).



wwwwww..Run Speed

There are multiple ways to calculate the value
of
Run speed.

My personal choice is to take the values of
HP
and Attack , and add them together to form
the value of
Run speed.

The reason I do this is because applying a static
value to unit movement doesn't work. Imagine a
fast unit with a high movement speed value but
only 20 HP and no attack. For this reason, the
run speed must be proportional to the overall
constitution of the unit.



wwwwwwAssigning MP

Magic points should not be considered something
that takes away from a unit's value; but rather,
something that adds.

Okay? So, when you create and balance your spells,
make them without the requirement of
MP first, and
then add MP to increase their power.

If it costs 500 rupees to add +1 magic regeneration
per second, this is 60 MP per minute. Therefore,
increasing the spell's MP requirements by +60
per minute, increases the value of the spell by
+500 rupees.



Post has been edited 10 time(s), last time on Jul 31 2024, 5:41 am by MetalGear.



None.

Jul 28 2024, 9:08 am MetalGear Post #2



wwwwwwwwArmor

Armor reduces damage dealt by enemies. There
are different Armor types (
physical or magical).
Starcraft Brood War uses static physical armor,
however, it is an old game, and better options are
available now.

The best means of adding armor is by using a
system of percentages AND a static armor
representation of these values. (Why? The
damage of some units is in their attack
speed.)


Experiment #1

Let's suppose you're creating a game and the
heroes can increase their HP progressively.
Go to the expected middle-stage of the game
and estimate how much HP the average hero
will have accumulated.

Suppose your hero has
1200 HP (regard this
figure as
100% HP) and this costs 2000 rupees.

If you were to double your hero's HP from
1200
to
2400 (like with an item or something), this
would cost
2000 rupees. Okay?

Therefore, to add
50% armor would have exactly
the same effect (50% armor doubles the hero's
effective hit points, reducing each attack by
0.5.),
costing
2000 rupees.

50% armor = 100% HP gain.

Please comprehend the above sentence.


Experiment #2

Now let's say you want to triple the HP from
1200 to 3600, this costs 4000 rupees.

If you were to suspend this decision and rather
spend 4000 rupees on armor, can you guess
how much armor 4000 rupees buys?

Think.

2000
R = 50% damage reduction
4000
R = 66.67% damage reduction

Maybe you guessed 75%? That's okay, I'll
show you how the math works.


Method #1: Percent to Value

Supposing 100% HP gain = 2000 rupees.

Reference: when I say "Invert %", if your armor
is 10%, change this to 90%.

100 / (Invert %) = A
A - 1 = B
B x 2000 = cost (rupees)


Method #2: Value to Percent

Cost (rupees) / 2000 = A
A + 1 = B
100 / B = C
Invert C = reduction %


Static armor

When it comes to selling armor to the player, it
is best to represent armor with static numbers,
because the value of percent numbers increases
with each point added.

Added value / damage reduction

100% HP = 50% armor
200% HP = 66.67% armor
300% HP = 75% armor
400% HP = 80% armor
500% HP = 83.33% armor

Take
50% armor that you've priced at X amount,
and divide it by whatever number you like to
render a static armor value. Let's choose the
number 20 for simplicity.

2000
R (100% HP cost) / 20 = 100R

So now, each point of armor costs 100R, and
adds a dynamic percentage amount.

(It would be impossible to represent an item
with an exact % of armor, because the % added
depends on how much armor the unit already
has.)



wwwwwww.Codex

For the creation of your game, you will need a
table of reference for all statistics, that gives
the costs of unit properties. You can then
calculate events and units easily.

Statistic / Measure / Cost

HP / 1 HP / 2 rupees (example values)
Health regeneration
MP
Magic regeneration
Run speed
Attack damage
Attack speed
Attack range
Armor
Evasion
Magic damage reduction
Magic damage
Sight range

These are just a few examples of the table. You
can even have a unique Codex for spells, like
invisibility, stun duration, immobilisation, and
giving values for each. This table helps to
balance spells.


Post has been edited 3 time(s), last time on Feb 19 2025, 12:57 pm by MetalGear.



None.

Jul 29 2024, 10:55 pm Wormer Post #3



Hello there! Balance is a tricky thing. There is also a range to add into consideration. Given only HP and Attack and a collection of units with known stats for 2 sides it's a hard computational problem to decide which units attack which units to achieve best outcome.



Some.

Jul 30 2024, 4:40 am MetalGear Post #4



Range belongs to the property of attack , and I agree, it is hard to predict its value. Dragoons start with 4 range, and the +2 range upgrade significantly improves the unit's survivability.

I'm experimenting at the moment, so my methods at calculating these intricacies will change and improve.

The first idea I had was to see how long it took my average hero to kill another hero, and then use the time between the ranged unit's first attacks before the melee unit reaches its opponent, and then double this duration for a retreat value. Then factoring this into kill-time. Once I have attained this value, I factor the
attack value of the hero and this is the cost of attack range.

The idea isn't perfect, however it seems to work for now. The value I attained was +10% cost of attack damage per tile.




None.

Jul 30 2024, 7:45 pm Wormer Post #5



I have stumbled upon some notes made back in days when I was trying to make a rock/paper/scissors balance. I was making a golem-like game where I tried to balance 3 air units versus each other. Now, it doesn't matter alot what are particular unit types, just suppose we are trying to balance units 1, 2, 3. For simplicity I don't consider zerg regeneration. I also ignore shields for the time being assuming all my units have only hit points.

My notation is:
Hi -- hit points of unit i,
Di -- base attack damage of unit i,
Mi -- multiplicity of the attack of unit i (some units do several hits),
Ai -- armor of unit i,
Ci -- cooldown of the unit's i attack (in game steps or frames),
Eij -- efficiency coefficient of the unit i attack type versus unit j size.

Efficiency coefficient Eij can be 1 (normal vs all sizes, or explosive vs large, or concussive vs small), 3/4 (explosive vs medium), 1/2 (explosive vs small or concussive vs medium), 1/4 (concussive vs large).

I forgot exactly which one is applied first: armor or coefficient reduction, but I guess firstly incoming damage is penalized by the size and only then reduced by armor.

Calculate how many damage Qij unit i deals to unit j in one attack round:
Qij = max((Di*Eij-Aj), 0.5)*Mi

Units in SC don't do less than 0.5 damage that why there is maximum. If we assume penalized damage from unit i to unit j is greater than Aj then Qij is simplified to: Qij = (Di*Eij - Aj)*Mi. This is probably not the most precise formula because I am unsure how fractional damage is handled exactly -- most likely it's rounded in some way to the closest multiple of 0.5. These details are however not very important in the view of what's coming below.

How many attack rounds Rij unit i needs to kill unit j:
Rij = ceil(Hj/Qij)

How many attacks will happen for unit i by time t (in frames):
floor(t/Ci)

Time Tij (in frames) needed for unit i to destroy unit j is the smallest integer solution to the following equation with regards to t:
ceil(Hj/Qij) = floor(t/Ci)

Stop here for a moment. Although the formula quite precisely answers the question "When unit j dies?", it is not very productive to go on in this manner. To make progress we simplify things with an assumption of continuous time. This removes all roundings (ceil and floor) from the formula and we explicitly express t from the formula:
Tij = Hj*Ci/Qij

This is easy to understand the other way around: mean damage that unit i does to unit j in one game frame is (Qij/Ci) therefore average time it takes to destroy unit j equals to Hj/(Qij/Ci), that equals Tij from the above.

How to compare units? This question doesn't have a definitive answer because units worthiness depends on the situation.

Genuinely we want to know what unit wins in a fight of Ni units i versus Nj units j, and by what margin, i.e. how many units are left for the winner or how many more units needed for the defeated side to make the fight even.

Unfortunately there is a (somewhat random and unpredictable) factor of units control to consider. The outcome heavily depends on what are units targets and how damage is distributed between them. For example, we want to focus fire on single enemy units to kill them faster, but we don't want to focus "too much" fire over the point where damage is wasted. In theory we want a method to compare units value in a "pure" environment that doesn't rely on these things.

My technique here was to put units in a 1v1 sparring "gladiator" battles: when one unit falls, it is being substituted by the other one from the units "pool". When one side has no more units in the pool the other side is announced the winner. It's score is the number of remaining units for that side.

Ask ourselves: how many units of type j can one unit of type i destroy before it falls? Denote this value by Gij. We know that Tji is the time that it takes for unit j to kill unit i, therefore unit i has exactly Tji time units before it is destroyed. During this time unit i will be able to destroy Gij = Tji/Tij units of type j.

Note that fractional part of Gij stands for the fraction of hit points lost by the last surviving unit j. For example if Gij = 1/2 it means that unit i only destroys "a half" of the unit j before unit i dies.

Call value Gij an effectiveness of unit of type i versus unit of type j. It is clear that Gij = 1/Gij -- effectiveness of the unit j versus unit i is inverse to the effectiveness of the unit i versus unit j. In our example where Gij = 1/2 it means that a single unit j kills 2 units i before unit j dies, i.e. Gji = 2.

Gij is actually a *value* of the unit i in terms of the unit j, because Gij equals to "how many of unit j a unit i is worth in a 1v1 battle". Assume that unit j is assigned some *cost* Vj, then it is fair to assign unit i the *cost* Vi = Gij*Vj.

Now let's put a group of Ni units of type i in a battle with Nj units of type
j by "gladiator" rules (at every moment only one pair of units is fighting,
destroyed unit is substituted by the fresh unit from the group). Since one
unit of type i defeats Gij units of type j before unit i dies, Nj/Gij units of type i will fall and we are left with Pij = Ni - (Nj/Gij) units of type i after the battle if this value is non-negative. Incidentally Pij equals to -Gji*Pji. Thus negative value of Pij represents how many more units of type i it lacked to destroy all remaining units of type j.

The assymetry in the "score" comes from the fact that for each side the outcome is measured in terms of units of that side. When Pji is positive it represents the number of units of type j remaining alive after the fight, but each unit of type j is worth Gji units of type i, thus the loss for the side controlling units i equals Gji*Pji of it's own units with negative sign. It can be beneficial to even out the score in such a way that the amount of score gained by one side equals to the amount of score lost by the other side with negative sign. Let Sij = Pij*sqrt(Gij) be the score of the side controlling units of type i then
Sij = sqrt(Gij)*Ni - sqrt(Gji)*Nj = -(sqrt(Gji)*Nj - sqrt(Gij)*Ni) = -Sji

Call the value |Sij| the score of the fight. The fight is fair when it's score equals 0, therefore the value Wij = sqrt(Gij) can be interpreted as a worthiness of a single unit of type i in a fight versus units of type j. As expected worthiness of i versus j is inverse of worthiness of j versus i: Wij = 1/Wji

Where we are at? Consider two examples of three units.

Example 1: G12 = 1/2, G13 = 1/3, and G23 = 3/2. What is the best unit there? Of course we don't know costs of these units. Let's assume that all units have the same cost. Incorporating cost into the equation doesn't bring very much depth into our analysis but complicates things. When all units cost the same, it is clear that unit 1 is the worst because it destroys half of the unit 2 and only one third of the unit 3. Unit 2 destroys two units 1 and one and a half of a unit 3. Unit 3 destroys three units 1 and two thirds of a unit 2. Obviously unit 3 handles unit 1 better, but looses to unit 2. Since nobody wants to produce unit 1, unit 3 is also rather useless, and therefore unit 2 is the best. This is a bad situation with a single "one wins all solution".

Example 2: G12 = 1/2, G13 = 3, G23 = 2/3. For unit 1: it's worse than unit 2 but better than unit 3. For unit 2: it's worse than unit 3 but better than unit 1. For unit 3 it's worse than unit 1 but better than unit 2. This balance is better because at least there is no "one wins all" situation.

Making a conclusion that for a "good" balance in terms of numbers for each unit of type i there must always be at least one unit of type j such that Gij > 1 and at least one unit k such that Gik < 1.

There is alot more to discuss there. For instance consider Example 3: G12 = 0.6, G13 = 2.5, G23 = 0.4. It is also an example of rock/paper/scissors balance, but how to compare example 2 with example 3? Which balance is better? In what sense? What units will you produce in each case? To answer these questions it is necessary to dive deeper into the theory of games with it's own problem statements.

When it comes to unit type i vs unit type j battles it is possible to consider a case of a "non-gladiator" all versus all type of a battle (under some sound assumptions). I have a system of two quite simple differential equations written in my old notes lying in front of me for this case, and there is a solution for it that shows exactly the development of the battle and it's outcome. Values Wij and sqrt(Tij*Tji) play an important role there. Maybe I find some time to share these later. Until that time share thoughts!



Some.

Jul 31 2024, 3:54 pm Wormer Post #6



The following is an analysis of an "all vs all" battle as opposed to 1v1 "gladiator" rules battle analyzed previously.

Set up is the following. We have Ni units type i fighting as a group versus Nj units of type j. The main value from the above is Tij -- the amount of time that it takes for a single unit of type i destroy a single unit of type j:
Tij = Hj*Ci/((Di*Eij - Aj)*Mi) (approximately, see the above for comments)

We also burrow Gij = Tji / Tij and Wij = sqrt(Gij) from the above that is the effectiveness of the unit i in a fight versus unit j.

Let x(t) be the number of units of type i for the first player at time t, and let y(t) be the number of units of type j at time t for the second player. Players 1 and 2 start with Ni and Nj units respectively:
x(0) = Ni, y(0) = Nj

Let's show how the value x(t) changes over period of time dt. At start we have x(t) units for player 1, but during period dt each unit of player 2 destroys dt/Tji units of player 1. At start of the period player 2 had y(t) units therefore y(t)*dt/Tji units of player 1 will be destroyed:
x(t+dt) = x(t) - y(t)*dt/Tji

By the same logic:
y(t+dt) = y(t) - x(t)*dt/Tij

Now move term with x(t) and y(t) to the left and divide by dt:
(x(t+dt) - x(t))/dt = - y(t)/Tji
(y(t+dt) - y(t))/dt = - x(t)/Tij

Then limit dt to zero, and the left part of the equation is the derivative:
lim_{dt -> 0} (x(t+dt) - x(t))/dt = x'(t)
lim_{dt -> 0} (y(t+dt) - y(t))/dt = y'(t)

Obtain the system of two differential equations (1)-(2):
(1) x'(t) = -(1/Tji)*y(t)
(2) y'(t) = -(1/Tij)*x(t)


The solution to this system is (I don't discuss how this is obtained):
x(t) = Ni*(exp(q*t)+exp(-q*t))/2 - Nj*Wji*(exp(q*t)-exp(-q*t))/2
y(t) = -Ni*Wij*(exp(q*t)-exp(-q*t))/2 + Nj*(exp(q*t)+exp(-q*t))/2

where q = 1/sqrt(Tij*Tji)

Function (exp(z)-exp(-z))/2 = sinh(z) is called a hyperbolic sine.
Function (exp(z)+exp(-z))/2 = cosh(z) is called a hyperbolic cosine.

Using these functions we can rewrite the solution as such:
x(t) = Ni*cosh(q*t) - Nj*Wji*sinh(q*t)
y(t) = -Ni*Wij*sinh(q*t) + Nj*cosh(q*t)

Okay, but who wins?
It is a stalemate when Ni = Nj*Wji that happens by the time t0 when approximately x(t) = 1:
t0 = (ln Ni)/q

If Ni > Nj*Wji then the first player wins at the moment t1, where
t1 = (2*q)^-1*ln((Ni*Wij + Nj)/(Ni*Wij - Nj))
At moment t1 player 1 has x(t1) = sqrt(Ni^2-Nj^2*Gji) units remaining, and y(t1) = 0.

If Ni < Nj*Wji (or equivalently Nj > Ni*Wij) then the second player wins at the moment t2, where
t2 = (2*q)^-1*ln((Nj*Wji + Ni)/(Nj*Wji - Ni))
At moment t2 player 2 has y(t2) = sqrt(Nj^2-Ni^2*Gij) units remaining, and x(t2) = 0.

Please note that these formulas work under the assumption that all damage from units is distributed evenly and perfectly. This assumption is true when groups of units are rather large and well-mixed (otherwise the effect of range will come into play). For the situations where Ni+Nj is close to several units these formulas fail to work because of the discrete nature of our simulation and because of micromanagement effects.

What conclusions can we make? Compare "all vs all" battle versus "1v1" battle analyzed above. In "1v1" situation the stalemate point is when Ni = Nj*Gji and if Ni > Nj*Gji the difference (Ni - Nj*Gji) gives us exactly the number of units left for the winning side. In "all vs all" battle the balance point is when Ni = Nj*Wji and difference in army strengths at start of the battle (Ni - Nj*Wji) is less than the number of units left for the winning side sqrt(Ni^2+Nj^2*Gji). Thus in "all vs all" battle unfair situation at start gets even worse for the weaker side at the end of the battle, i.e. unfair battles only strengthen the winning side. Avoid unfair battles at all costs: you will lose even more! In "1v1" kind of battle it is not the case: the exchange is always even for both sides.

Another point to make is that in "1v1" situation a worthiness of a unit of type i versus the unit of type j is the value Gij, when in "all vs all" situation the worthiness of a unit of type i versus the unit of type j is only Wij that is the square root of Gij.

Post has been edited 4 time(s), last time on Jul 31 2024, 6:08 pm by Wormer. Reason: Fixed a mistake in the solution y(t)



Some.

Jul 31 2024, 6:19 pm Wormer Post #7



I have made a spreadsheet calculator that uses formulas above to calculate the outcome of a battle (both for 1v1 and all vs all):
https://docs.google.com/spreadsheets/d/1C8g7FvERz4O5hjn4lmPXnMeCisF8717KnGJnWb_9gTE/edit?usp=sharing
You should be able to edit unit 1 and 2 stats on the Calculator page, but generally speaking you better off by copying the spreadsheet and playing with it on your own.

As the first example I've put 70 Terran Marines versus 50 Zerg Hydralisks. The 1v1 outcome is in favor of Hydralisks with 8 left, but the all vs all outcome is in favor of Marines with 27 left on the battlefield. The all vs all battle duration is 248 frames. The pace of the battle is illustrated on the graph (by Wolfram) that depicts functions x(t) for Marines population and y(t) for Hydralisk population:
Failed to get ImageSize ( http://www.mediafire.com/view/epicfxr9o5bqd2e/2024-07-31_21-10-14.png/file )

EDIT:
I have also put 50 Marines vs 50 Hydralisks to compare the result with the video
https://www.youtube.com/watch?v=Yd57MhdCn6k
Calculator predicts 30 Hydrlisks alive in the end and there are 24 Hydralisks left on the video.

Then I tried another video 24 Siege Tanks vs 32 Dragoons
https://www.youtube.com/watch?v=9eDZ5l6cWag
Calculator predicts 20 Dragoons alive but on the video there only 8 left.

It's not ideal, because of the engagement phase. I believe that if units start in a mixed state the results will be closer to expectation.

Then I've made an analysis of a Basic Unit vs Super Unit from Metal Gears's first post with these stats:
Super unit: 400 HP / 80 damage
Basic unit: 200 HP / 60 damage

While the 1v2 battle is perfectly balanced here if we add more units we might see that one Super is worth less than 2 Basic units (approx 1.6 according to formulas), especially in larger battles. In theory the battle of 50 Basic vs 25 Super units is greatly in favor of Basic units with approx 29 units stay alive in the end. As the results might be more optimistic than it is I speculate that we might expect around 17 basic units left in this battle.

EDIT2:
I have made my own tests where units are better mixed.

For 24 Tanks vs 32 Goons in a series of 3 tests the results were 22, 24, 22 Goons remaining (mean 22.6) versus predicted 20.7

For 50 Marines vs 50 Hydralisks in a series of 3 tests the results were 31, 33, 34 Hydralisks remaining (mean 32.6) versus predicted 31.6

For 50 Basic (Marine) vs 25 Super (Hero Marine) in a series of 3 tests the results were 31 24 27 Basic Marine remaining (mean 27.3) versus predicted 28.9

In these tests results are much closer to predicted values. Test maps are in the attachment.

Attachments:
24tanks_vs_32goons.scx
Hits: 0 Size: 25.67kb
50marines_vs_50hydralisks.scx
Hits: 0 Size: 26.62kb
50basic_vs_25super.scx
Hits: 0 Size: 26.62kb

Post has been edited 10 time(s), last time on Jul 31 2024, 10:10 pm by Wormer.



Some.

Aug 8 2024, 7:59 am MetalGear Post #8



wwwwww.Extra Notes

The final dimension of balance is paradoxically
the opposite. Perfect balance is boring. Players
enjoy to learn all of the game's apparent '
cheats'
or '
special knowledge' regarding imbalances.

When unbalancing a game, I created for myself
the '
88 rule'. Once I know the unit is perfectly
100% balanced, I can tweak its measurements
by 12% of its original value. This may sound a
bit much, but it gives me the freedom to make
the game interesting.



wwwww...Factor Types

1. Supply
2. Ore value
3. Build time
4. Projectile speed
5. Attack time
6. Factory cost
7. Scale

1)
Supply

In Starcraft, different units take up different
amounts of supply. Some units are expensive
in supply, like Zealots for example. They cost
100 minerals and take up 2 supply. Dragoons
cost 1.75 the price and cost the same supply.

By race, Zerg is the most efficient in supply
(high unit cost with low supply), Terran is the
next most efficient, and Protoss is last.

Having an idea of how many minerals equate
to what measurement of supply is required
when building base economies. A unit with
a low supply cost will pull on another statistic,
like a higher mineral value or build time.


2)
Ore value

Starcraft uses multiplicities of 25 for prices,
because certain types of numbers are more
aesthetically-pleasing than others. Figures
of 25 also makes counting easier. However,
this is not necessary.

The most important thing is that the price
represents the value of a unit.

If a unit has both ground and air attacks that
deal the same damage, you'd need to double
the cost of its attack.


3)
Build time

Build time regards the basic efficiency of a
factory (building that produces troops).

If a unit's build time was cut in half, how
much would this affect the price? Consider
that factories will most likely be inactive
sometimes. Therefore, if a factory is
estimated to have 50% inactivity, then
100% build time would equal 50% price
adjustment.


4)
Projectile speed

Units with slow projectile speed (Dragoons)
have a disadvantage in combat compared
to units with instant attack (Hydralisks).

The only real way to find a measurement
for this is to physically test units in a test
map. Make different groups of units with
all the same values apart from the tested
attribute (Projectile speed in this example)
and score the results.

Consider that if group A (instant attack)
wins with 25% of its troops remaining
against group B (slow projectile speed),
this is a 33.33% advantage.

100 / 75 = 1.33...

The price should change 33.33%.


5)
Attack time

Attack time or Attack animation time is
the time it takes a unit to strike or launch
a projectile. The mechanics work by the
same principles as Projectile speed.

The faster a unit attacks, the more time
it has to move and catch up with a rival
when chasing it.


6)
Factory cost

A higher price for a factory means two
things:

a) faster unit production
b) condensed physical space

In Starcraft, Terran Factories are double
the price of Gateways. Therefore, they
pump out more value.

Since they pump out extra value units,
technically you require less Factories
than Gateways, this frees up physical
space. (Add-ons do affect physical space
but the premise remains true.)

Having extra space is a very good thing,
of course.


7)
Scale

Scale is how much a unit progresses with
all of its upgrades. Most units have their
attack damage scaled between 30 to 50%
(the accumulation of all 3 upgrades).

Zerglings gain massive attack speed by
the end of the game, but this upgrade
would be factored at perhaps 50% value,
since there is a large portion of the game
where this upgrade does not take effect.

Individual units should gain more value
from an upgrade rather than upgrades
that support multiple units.


Post has been edited 1 time(s), last time on Aug 8 2024, 4:26 pm by MetalGear.



None.

Aug 14 2024, 6:53 pm Wormer Post #9



Indeed, the whole game balance is a complicated thing that has multiple layers to it. For example we can balance unit A in favor of unit B with it's Ore cost, but the other way around with it's time-cost, or it's gas cost, etc. In the end good balance is achieved by lots of testing. However, math can give us a good hint regarding where to find that sweet spot.

I don't want to sound like a nerd and the whole thing that I've written above is awfully presented, but an interesting conclusion that can be made from the above is that in different types of engagements units will have different balance characteristics against each other: in narrow passages where units exchange almost 1vs1 one unit can be more advantageous against the another, while in other situations (say on the open space with big armies) the situation can be the opposite with the same sizes of armies.

Therefore, I would definitely add a type of a tactic engagement that we are balancing to factors.

Quote from MetalGear
Consider that if group A (instant attack)
wins with 25% of its troops remaining
against group B (slow projectile speed),
this is a 33.33% advantage.

100 / 75 = 1.33...

The price should change 33.33%.
This is only true for 1v1 type of engagements (narrow spaces) or small quantities of armies because under these circumstances unit exchanges obey a *linear* rule. When the size of the army grows on an open space the analysis above shows that exchanges will have *exponential* nature -- it means that even small imbalances in initial armies will have a large impact on the outcome. In other words, on the large scale units don't trade evenly: in unfair engagements the defeated side has lost significantly more than the victorious side.

If we are balancing units for "macro", or for "late game", or for "large battles on open spaces" then I suggest to better find a *sweet spot* where armies almost entirely eliminate each other and call that situation a balance. The simple kind of an estimate from the above won't correctly work in this case. My spreadsheet calculator from the above is able to predict the approximate size of armies needed for achieving the balance in this case. It's even pretty accurate up to the point where armies become small/medicore in size and when other effects (randomness, micro, the fact that units mass is discrete in nature, etc.) take over.

Post has been edited 8 time(s), last time on Aug 14 2024, 7:13 pm by Wormer. Reason: Small typos, wording



Some.

Aug 14 2024, 7:16 pm Ultraviolet Post #10



Quote from Wormer
I don't want to sound like a nerd

Too late :shifty:



My Projects:

Impossible Ultraviolet | Impossible UV 2 | Impossible UV 3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Aug 14 2024, 7:16 pm Wormer Post #11



There is an interesting question/problem: balance SC units to adopt them for a fair island maps play without staying too far from the original. Surely there been many attempts over the years, however I haven't encountered anything like that on my way.



Some.

Aug 14 2024, 7:18 pm Wormer Post #12



Quote from Ultraviolet
Quote from Wormer
I don't want to sound like a nerd

Too late :shifty:
:teehee: Haha! Anyway, I might present this research in a better way soon, if I have enough free time/motivation to put it in LaTeX document.



Some.

Aug 15 2024, 4:47 am MetalGear Post #13



Lol, you MUST be a nerd to challenge this Topic. By the way, this information is for any game creation, that includes Starcraft and outside of Starcraft.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:32 am]
Moose -- tbh
[2025-3-24. : 8:37 pm]
Ultraviolet -- :wob:
[2025-3-23. : 8:32 pm]
RIVE -- Oh Yeah
[2025-3-23. : 1:20 am]
lil-Inferno -- ya
[2025-3-22. : 2:43 pm]
Moose -- o
[2025-3-19. : 10:35 pm]
Ultraviolet -- OH YEAH!!!
[2025-3-19. : 9:33 pm]
NudeRaider -- oh yeah
[2025-3-19. : 4:11 pm]
dumbducky -- Oh yeah
[2025-3-19. : 4:11 pm]
dumbducky -- Hmm
[2025-3-19. : 4:10 pm]
dumbducky -- Hmm
Please log in to shout.


Members Online: NudeRaider, Ultraviolet