Wednesday, July 08, 2009

RTS Theory?

I've reached that stage in my new RTS game where all the main programming is done (apart from all the boring bits like a start and end, and changing the UI so someone other than myself knows what to do) and it's now down to tweaking the mechanics.

I used to look forward to this bit, but with something like my (albeit very simple) RTS, there are so many variables that I feel like a need some read some kind of book on RTS theory. There are (only!) 4 different kinds of unit. Each one has a cost, movement speed, a view range (how far they can spot enemy units), a shot range, a shot power, a "health" rating (how much damage they can widthstand), and finally a threat rating (for the AI). And I'm sure this is very simple compared to most RTS's. Then there are other factors, like how much to increment the players cash based on how many mines they have.

Most people hold up Starcraft as a prefectly balanced games, and I want to know how they did it. With all these hundreds of variables, did they just play the game several trillion times, each time tweaking it like "that unit is a but powerful, let's reduce its firepower". Or do you increase the other unit's firepower to compensate?

Questions questions questions. The main problem at the moment is that Island Commander is an "arms race" game, except instead of arms, it's mines. If you don't build as many mines as possible as quickly as possible, the enemy will soon overrun you. How does Starcraft (or any other RTS) avoid this problem?


Anonymous said...

I'm no expert, in fact I myself have only started creating some games, but I think I have at least a hint:
There are 2 common ways to "balance" a RTS (and also other kind of games, on the same note). You can either try to have a truly "balanced" game, a task that really can only be accomplished by hunderts if not thosuands of hours spent playing hte game, or you can opt for a "rock-paper-scissor" way of doing things: the benefits of one unit beat those of another unit. To achieve this, you have to have an uneven number of possible units, and you have to be careful to keep the balance alive, as it#s easy to let it get really just a race to the ultimate unit..

Bryan said...

Are you familiar with KirbyKid's theories on classical game design?

If you establish good game mechanics, vary the units to take advantage of them, and build counters when a strategy or unit gets too strong, that should handle the majority of problems.

Steve said...

Thanks for the ideas. I did think about the rock-paper-scissors idea, but I like a challenge so I decided to go for the "create units of various abilities and give them a proportional cost" method.

Bryan said...

This is more than "Rock / Paper / Scissors". The idea is to create a set of gameplay mechanics which are appropriately balanced.

If there are mines, what are they supposed to be used for, when, and where? Do you have a game description available? Can I try it out?

Under the classical gaming model, you have a few game mechanics. Because this is an RTS, they are usually layered on top of the primary game mechanics. These game mechanics probably are:
place mine, clear mine, and move. They should be balanced within the framework of the rest of the game.

In other words, mines should not be so cheap that they can be placed everywhere. That cost might include resource cost, placement time, placement distance (can I launch them or build them a few spaces away), and the mental cost of managing it. On one extreme, your mines will cover everywhere, including the enemy base. On the other extreme, they will not be built at all.

In between, there are a couple of interesting distinctions. The most common use of mines is defending your base. If your base has multiple entrances, should you be able to mine all of them? If so, how thickly? If you do place mines, how easy are they to replace after they have been cleared or blown up?

If you can place mines at each entrance, that removes the move mechanic for getting to your base. The move option is then reduced to pressuring different mined entrances until one of them has been cleared. Some units might also have special properties allowing them to avoid mines, such as flying or hover units.

The clear mine mechanic has been handled many different ways in games. Overall, changing the various costs for this should be balanced against the cost of the mines and winning the game. There should be multiple methods of clearing a minefield, including just having your cheapest units drive over it.

Sirlin has a ton of articles on Starcraft from a class he audited.

KirbyKid has a series analyzing Pikmin with some comparisons to Starcraft from a class he audited.

Steve said...

Thanks Bryan, you've provided exactly what I was looking for - though I didn't realise there was so much of it! I'll give it all a read and see how it can help me.