Sid Meier’s Civilization V Scales to Build Empires
Few computer games have the audacity to encompass the entire span of human civilization or resurrect famous leaders across centuries to offer guidance to gamers. Sid Meier’s Civilization franchise doesn’t shirk from giving players an epic journey through the victories and perils of building an empire, whether through diplomacy, ingenuity or physical force.
Civilization V (Civ5), the latest version of this long-running, turn-based computer strategy game, introduces a brand-new architecture built from the ground up that improves performance and gameplay on a wide range of hardware platforms. Given a processor with two, four or six cores, Civ5 will distribute tasks and workloads to maximum advantage for every user, from entry-level to mainstream to enthusiast PCs.
Efficient threading is the key to rapid-fire gameplay, and tools to streamline threading proved to be an essential element of Firaxis Games’ development process of Civ5. Software tools gave developers a window into the game’s processor core usage, platform operations, and frame complexity, enabling them to tune and optimize the game and graphics performance for a wide variety of hardware platforms.
New Game, New Architecture, New Engine
No game publisher can expect to thrive in the competitive landscape of the PC games industry today without knowing how to take advantage of the latest software tools to exploit the ever-evolving platform capabilities. With games growing more complex each year, coupled with new APIs and hardware platforms, three cardinal rules guide developers:
- Achieve scalable game performance
- Optimize for a range of platforms to increase the size of the target audience
- Create a road map to accommodate future platforms
During the development of Civ5, Firaxis took those factors into account and re-architected its game engine to take maximum advantage of multi-core processing -- with an eye to the future as many-core processors become even more prevalent. Firaxis was able to tune Civ5 for a wide range of PCs, eliminating graphics bottlenecks that hurt performance and distracted from the gameplay experience.
The throughput challenges presented by Civ5 were particularly demanding because of the number of character interactions taking place at any given time. For example, in a first-person shooter, a typical maximum of 20 fully animated, unique characters could interact in a scene. In a massively multi-player online role-playing game, the number of animated characters could climb to 100. To accommodate Civ5’s 10,000 characters at a time, the development team increased the scalability of the game engine to take better advantage of multi-threading.
Identifying and Eliminating CPU and GPU Bottlenecks
“When you are writing a game,” says Dan Baker, graphics lead at Firaxis Games, “two things can potentially slow you down: the CPU or the GPU. You can’t run any faster than whichever one of those two is slowing you down. We have to use a two-prong approach and worry about what is happening on both the CPU and the GPU.”
With the use of performance-analysis tools, Firaxis developers were able to get a system-level view of operations, offering a clear, visual depiction of CPU and GPU activities on the same scale. This capability, coupled with the ability to zoom down to a low level to pinpoint performance issues, provides an extremely useful macro-level and micro-level perspective to developers. Firaxis used these features to troubleshoot Civ5 and address problems at the code level.
Graphics Performance Tuning
The Civ5 development team also used the software to analyze graphics to optimize the game’s performance on various processors. “We analyzed what was slowing it down,” Baker says. “You find out real fast that some things that are providing a little bit of visual quality are very expensive. If you turn those down, you can really get the gameplay performance running a lot better.”
The team figured out where the biggest performance hits were taking place and quickly determined that effects such as water simulation, with its heavy shaders and distance fog, were strongly affecting performance.
By making a few subtle changes -- such as making icons and borders a little less crisp -- the team was able to improve performance on multiple platforms. “Even though a high-end graphics card doesn’t have any problem with these issues,” Baker says, “when you start to talk about an integrated graphics chip, some things can slow it down a lot.”