Advertisement

play balance

Started by April 03, 2009 01:26 AM
34 comments, last by Wai 15 years, 10 months ago
Hi all, I am currently designing a rts game and I was just about to get started designing the units and giving them statistic values, when I thought that it would make the game inbalanced I was hoping someone could give me some tips on how to design a rts combat system, which is balanced. Thnx
Hi,

When you say the Combat system, did you intend to exclude their production?

When you say that it is not balanced, do you mean that your combat system favors only a few units or only one strategy?
Advertisement
A common balance system in strategy games involves a rock-paper-scissors approach. For example, Polearm troops beat shock troops, which beat ranged troops, when in turn beat polearm troops. A problem I have with this system is that the best strategy obviously becomes having equal numbers of each soldier type. Of course, where troops are moved has a major effect. It determines what kind of troops fight, and thus who has the advantage.

Your system doesn't have to have just three different unit arch-types. You can have a longer chain. A unit can even have multiple combat modes that change its arch-type. Some examples would be the siege tanks in Starcraft, or in Battle Zone 2 the ability most Scion units have of being able to morph.
First, you have to organize the units. Divide your units into categories like ground, aerial, and naval are typical division of the units. Then you will have to divide further. When you see that you have divide and organized your units into their proper categories, then you can think of balance.

A medeival time division:
Light Infantry
Medium Infantry
Heavy Infantry

Light Cavalry
Medium Cavalry
Heavy Cavalry

etc

When you are able to develop these categories, think about the roles of these units. A simple rock paper scissors strategy is that Indirect Units > Direct Units > Shock Units. For example Archers > Spearmen > Cavalry. You have to have the relation between the categories, and that certain category is always stronger than another category.
I use QueryPerformanceFrequency(), and the result averages to 8 nanoseconds or about 13 cpu cycles (1.66GHz CPU). Is that reasonable?
I though that the assembly equivalent to accessing unaligned data would be something similar to this order:

  • move
  • mask
  • shift
  • move
  • mask
  • shift
  • or

    So it seems reasonable to say that it takes 14 cycles for unaligned data since we'll have to do the series of instructions once to access and once to assign?
My favorite approach to this would be to construct a balance table. I read about this technique in a design book I was studying some time ago. In short, you calculate the worth of a unit, and build how much it costs in proportion to this. You create this by saying that a unit will defeat x number of another unit when pitted in direct combat - a positive number indicates a number defeated, while a negative means that that number would be defeated by a single unit of the other type. In the Rock-paper-scissors example below, we have an 'archer', a 'swordsman', and a 'horseman'.

 ___________________________________________|           | Archer | Swordsman | Horseman ||-----------|--------|-----------|----------||   Archer  |   0    |     1     |    -1    | | Swordsman |   -1   |     0     |     1    ||  Horseman |   1    |     -1    |     0    ||___________|________|___________|__________|


Obviously this makes them balanced and gives them the same worth of 0 points - the totals of all three units add to 0 if you read in rows or columns. If we plug this into the formula c = 10v + 100, where c is the cost of the unit and v is the value, calculated by adding the three values, then we get a price of 100 for each unit. However, we could tweak the stats and still keep it balanced. If we switch to this:

 ___________________________________________|           | Archer | Swordsman | Horseman ||-----------|--------|-----------|----------||   Archer  |   0    |     2     |    -3    | | Swordsman |   -2   |     0     |     1    ||  Horseman |   3    |    -1     |     0    ||___________|________|___________|__________|


Then the Horseman has a worth of 2, the Swordsman a worth of -1, and the Archer a worth of -1. This makes the Horseman very powerful, and, in a costless game, they would be a clear choice. However, plugging them into the formula, we get a price of 90 for the Archer, 90 for the Swordsman, and 120 for the Horseman. Each unit has a situation where it is useful, but their price reflects their actual value.

And that's balance matrices.









Dulce non decorum est.
The three things I have learnt when designing my RTS are as follows:

1) Emergent RPS
Instead of having X beats Y, which beats Z, which beats X, have them work in different scenarios. Obviously, this varies depending on your game. In mine, I have Shotgun Troopers who do the most damage. However, they have a very short range. They are fast and so can beat marines as they get close enough to attack them before the marines get to them. However, Snipers have a very long range. If you position them so that they have a full line of sight, then they will beat the shotguns before they get close. However, marines end up beating snipers as they do damage early enough to beat the snipers as the snipers have less health.

2) Different Scenarios
This builds on the last point, but have units excel in certain areas. Don't make X always beat Y, instead make X beat Y in certain areas on the map.

3) The Balance Graph
This was shown to be by some much clever than me, and it really helped me to understand interesting balance - particularly when it comes to units that upgrade to better units. His idea allows the "better" units to merely be more specialised. Anyway, I'll let the graph speak for itself.



Basically, the idea is that you should be able to balance the circle on a pencil as this represents balance. Helped me tremendously, credit goes to xor. Sadly, his image was broken, but you canr read his post here
-thk123botworkstudio.blogspot.com - Shamelessly advertising my new developers blog ^^
Advertisement
Chess uses another way to balance combat. In chess, the Queen is the strongest unit, and the units are not really organized into a network of counter units. The environment of chess is competely melee. RTS is not like Chess, but there are some mechanisms you can get from it.

In terms of counters, another way to implement counter is not by the identity of the units but by situational properties, such as location or the weather. For example, the way you would describe Archers, is that they can attack something away from them. They are vulnerable to anything that can attack them. It doesn't matter whether the enemy next to them is cavalry, infantry, or another group of archers. This situation is similar to Chess, where a group of unit is vulnerable whenever it is in the attack range of some other group.


----

Fundamentally, RPS does not have tactics, but Chess has tactics. So perhaps it is more relevant to borrow from Chess than to model RPS and add additional rules to make it tactical.

Imagine a Chess board with some squares turned into holes. It is obvious that the player's tactic must consider these holes because tactical basis of Chess units is the position of the units and their attack ranges.

Similarly, in a RTS combat system designed using vulnerability based on positions, the environment is an important consideration that shapes the player's strategy.

For example, when you start the game, the player might notice may cliffs. This prompts the player to use Archers because only the Archers can take advantages of the environment. On the other hand, if the player starts the game with a lot of Archers, the player might select the base in a cliffy area so that the base can be easily defended with additional walls and gates, and possible some, but fewer infantry units.

[Edited by - Wai on April 3, 2009 3:49:45 PM]
Thnx for all the quick replies.

I have two new questions:

- Is there also a way to go about it without a rock-paper-scissors system or would that make it to difficult to balance?

- Can I create balance matrices with more than three units?
Quote:
Original post by dries123
- Can I create balance matrices with more than three units?


Certainly, see below:

 ________________________________________________________________|           | Archer | Swordsman | Horseman | Cannon | Privateer ||-----------|--------|-----------|----------|--------|-----------||   Archer  |   0    |     2     |    -3    |  -5    |     1     || Swordsman |  -2    |     0     |     1    |  -3    |    -1     || Horseman  |   3    |    -1     |     0    |   0    |     2     ||  Cannon   |   5    |     3     |     0    |   0    |    -1     || Privateer |  -1    |     1     |    -2    |   1    |     0     ||___________|________|___________|__________|________|___________|


Plugged in:

 __________________________|           | Value | Cost ||-----------|-------|------||  Archer   |  -5   |  50  || Swordsman |  -5   |  50  || Horseman  |   4   |  140 ||  Cannon   |   7   |  170 || Privateer |  -1   |  90  ||___________|_______|______|
Dulce non decorum est.
Are you concerned with balance with or without production costs?

If there is production cost, you could design the units however you want, and balance them in their costs.

There is something missing in the presented method. Suppose you have two kinds of units and one is superior than the other in direct combat:

1 Hero == 10 Soldiers

Conceptually, you would expect a Hero to cost $100 and a Soldier to cost $10.

But now you try the method as Delphinus written above, you first get the matrix:
          Hero   SoldierHero        0       9Soldier    -9       0


But according to the method, the cost of a Hero would be $190 and a soldier be $10. But then given $190, a player could either make 1 Hero or 19 Soldiers. It is clear that the player who made 19 Soldiers would win. What went wrong?


----

If your RTS does not involve production cost, you could start the by showing the map, and the units (randomly selected from available unit types), then let the players have an "I cut, you choose" session where one player divides the units, and the other player could choose the group and one of the two starting location of its group.

In this system, the designer does not need to balance any of the units, and the units could have very strange gameplay dynamics/attacks. You let the players balance the units by letting them make the cut. A player who knows the game well could cut the units such that one group appears weaker but is in fact the stronger group due to some tactical synergy effect.

[Edited by - Wai on April 4, 2009 4:02:30 PM]

This topic is closed to new replies.

Advertisement