Monday, May 11, 2009

Designing Games In A Vacuum, Part 1: Terrain & Positionality

In developing the space-based RTS game AI War: Fleet Command, I encountered an unexpected design challenge: namely, I hadn't anticipated the issues that would be caused by setting the game in space. I've played space-based games like Homeworld (which I didn't care for) and Descent: Freespace (which I loved), among many others -- all sorts of Star Wars games, for instance. Most of the games that I had loved which were set in space all had a strong action element to them, usually involving piloting smaller craft through asteroid fields, near planets and back, or around much larger enemy ships (Star Fox also fits this mold in many of its levels).

I've never been much into the 4X genre, which is also commonly set in space, but from what I have seen the appeal there appears to be detailed management of a lot of different colonies and planets and fleets, all of which have unique attributes. This was sort of along the lines of what I wanted to do in AI War, except I wanted more of a focus on realtime military management. The idea was that it would be similar in feel to my favorite terrestrial RTS games, except bigger (multiple planets, etc), and in space.

Issues
On the surface this might sound simple, and I delved into design and the early prototypes with gusto. Each early prototype introduced new elements, making the experience more fun and more of an actual game, but at the same time a whole slew of unanticipated challenges were appearing. I was accustomed to terrestrial RTS games, for the most part, and so was unprepared for some of the bigger issues that I suddenly found myself facing when I tried to translate what I knew into space. Here are the first two:

Shortest Path
1. In faux-3D space, where there are no obstacles that really block ships from traveling, the shortest valid path between any two points is always the line connecting them. This makes most of the space around planets pretty useless, because when you arrive at a planet you should just go straight at the enemy, and they'll just come straight at you. Not exactly riveting.

Terrain
2. Connected to the first issue, there is no terrain in space. In a terrestrial game you have water, which might contain naval units and block land units (that can't hover or what have you). You also have forests, mountains, hills, rubble, neutral buildings, craters, and a slew of other environmental features to get in the way of your units. These help players create choke points, take elevated ground or cover for tactical advantages, and so on. In space there's just... nothing. So all of that good complexity is out the window, unless you do something like have ships with bonuses in asteroid fields, nebulae, or other space phenomena -- and that seems mildly contrived if overused, as well as not too workable for the general game concept.

Solutions
It took many, many iterations of design for AI War to arrive at the state that it is currently in. My alpha testing team was invaluable in their feedback on what worked and what didn't, what made sense, what was confusing, what was fun or annoying, etc. Here is some of what we learned:

Create A Sense of Position Where There Is None
In space, when any position is tactically as good as another, you need to have your units themselves create positional meaning. Early builds of the game had all AI ships on a planet immediately chase and attack any player ships that came into a planet's system. While this was an effective tactic for the AI, it was not very interesting to play against. This gave rise to the concept of command posts, which AI ships guard and will not stray too far from, and which often have unique building-style units present that the players either want to capture or destroy. This makes pockets of enemies that the players must maneuver around to succeed.

I kept coming back to some of my favorite 12-hour marathon games against the AI in Empire Earth. The reason those were fun was the a constant flow of enemies attacking my team, as well as all sorts of semi-isolated pockets of units that they did not attack us with. This behavior was not actually part of the EE AI, but it came about due to AI transport limitations on "team islands" random maps. As players we used that to get the sort of game that we found most fun.

In AI War, therefore, I went with a similar sort of design, except that instead of the AI having semi-isolated pockets of ships based on not being able to effectively cross water (since that doesn't exist in space!), I made most of the AI ships on AI planets have a guard directive as their primary behavior. They must protect the command post/station, never straying too far from it unless it is destroyed. The addition of "Special Forces" units (which don't guard, but rather just patrol around planets at random) finished off this concept by adding the uncertainty of what and how many units are passing through a planet at any given time (reinforcements and the constant threat of incoming AI waves also help keep the players on their toes).

With a randomized distribution of resource patches on planets, a randomized effect to AI defensive positions, and a wide variety of auxiliary enemy structures that help to create secondary goals (Data Centers, Ion Cannons, etc), this made for the varied and interesting planetary maps that you see in the final game. Since there is no real terrain in space, the terrain had to be based on the position of resources, and how the AI is arranged to defend those resources. In some senses, that therefore means that the terrain is ever-changing in the game, since the relative strength of locations on any planet shifts as the AI reinforces and the player attacks. That's not an effect you tend to get too much in terrestrial RTS games, so that was a differentiating factor that I was happy to stumble into.

Making the enemy planets randomly unbalanced also went a long way to creating the overall galaxy-wide terrain. Because some planets are impossibly hard at the start, they become semi-permanent blockers, like mountains you can only eventually tunnel through. This made it so that, on a galaxy scale as well as on a planetary scale, players could not always take the shortest path between any two points -- usually there's a better way, if the players scout and strategize effectively.

Let The Players Set The Pace Of Game Advancement
You might not think that game advancement has much to do with terrain, but in a game that is all about capturing and holding terrain, the issues are very much intertwined. In AI War, there is a numeric "AI Progress" indicator that increases by 1 every time you destroy a warp gate or take a planet (of which there is one each per planet). You can decrease it by 2 by destroying data centers, but there are comparably few of those. The higher the AI Progress level goes, the stronger the AI becomes, both in its defensive reinforcements and its offensive waves.

The AI Progress came about as part of my desire to have this be a thinking-focused game, rather than a race to tech up. The AI basically holds steady with its level of technology and the size of its individual raids and reinforcements if you don't take any planets. If you do nothing it will still continue to bombard you and reinforce with the level it currently has, of course, which means that if you ignore an AI planet near your forces for a good part of the game, you might later return to find thousands of low-level ships waiting there. The AI Progress system also penalizes players who don't plan ahead, because if they just take every non-valuable planet they come across, the AI will get too powerful and will probably kill them.

This overall pacing is helpful because it allows the players time to scout, plan, and carry out their plans, without letting them just turtle up and hoard resources and units. "Boom" was always my strategy against AIs in other games (yes, I'm one of those, but only because it was so effective), and I wanted to invalidate that strategy in AI War because it's so much more interesting when your activities are constantly changing throughout play (a mix of military offense, economy management, military defense, and exploration). In other games there is often an incentive to just focus on one aspect of the game at a time, at least when fighting the AI, and I wanted to turn that on its head.

Coming back to the issue of terrain, the AI Progress system also helps contribute to the sense of place and differentiation between all the planets in the galaxy, believe it or not. Players have to decide not just whether they have the strength to take a given planet, but whether it is strategically wise to do so. Does this planet get us closer to a goal, open new avenues for expansion, or net us significant resources? Without the pressure of the AI Progress increasing with every acquisition, the strategic implications of taking any planet would be simple, as in most other RTS games: take it if you can. But the presence of the AI Progress meter can make it so that even a comparably low-level planet is "in the way" (in the sense of mountains or water bodies in other games), not because you can't capture it, but because you think it would be unwise to do so.

In no other RTS game that I can think of are there so many subjective decisions that can have such a far reaching effect on the future of your campaign. I'd really love to see what some other developers might do with this sort of idea, really emphasizing opportunity cost at every turn. RTS players are used to having to make hard decisions when it comes to what units to build, but the strategic issues of how, when and where to expand have never been so difficult.

I designed and coded this game, and I have yet to find even a semi-consistent "best path" to victory, or any dominant strategy to use in the early game. That was one of my chief objectives with this game (since I'm basically done with an RTS game as soon as I find that best path). In the next article in this series, I'll talk more about how the unique design challenges of a space environment helped make this happen.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.