DARKNESS BE GONE: Graphics Optimization Reveals Darkspore* Creatures in Their Best Light

Intel® GPA Reveals Darkspore* Creatures in Their Best Light

Intel GPA reveals darkspore creatures in their best light

Spore*, a popular game that pioneered innovative creature editing technology, inspired Darkspore*, a battle-oriented online RPG where life forms pit strengths against each other and exploit weaknesses. Gamers build a unique collection of genetic heroes and combine them into squads—either singly or in co-op game play. From the onset, the Maxis development team wanted a game that could take full advantage of the latest multithreaded processor architectures and also deliver satisfying game play on systems featuring integrated graphics. Darkspore does both.

The balancing act between game platform capabilities and game realism poses a perpetual challenge for development teams. To ensure that Darkspore takes full advantage of PC game platform performance, Maxis turned to Intel® Graphics Performance Analyzers (Intel® GPA). Specifically, the development team used Intel GPA to identify ways in which 3D models and landscapes could be simplified without sacrificing visual richness. They also found and eliminated bottlenecks in the code that were causing game play to lag, particularly on mainstream systems, which represent a huge growth market over the coming years.

The planets in Darkspore* are a combination of sets of static geometry and ‘AI Director’ spawned enemies and environment objects. We feel this design provides the best balance of aesthetics and game design: fixed backgrounds to allow for the best possible art, variable game content to maximize replayability.”

—Jeff Gates, Software Engineer, Maxis

Though development was well underway before the debut of the 2nd generation Intel® Core™ processor (which includes greatly expanded graphics processing capabilities integrated into the processor die), Intel GPA-based optimization work has already paid dividends. The streamlined and optimized game code performs exceptionally well on the processor’s architecture. For example, interim builds indicated average rates of 45 frames per second (fps) at 1280 x 800 resolution (using default graphics settings) when running Darkspore on a platform powered by a 2nd generation Intel Core processor.

Intel GPA reveals darkspore creatures in their best light

Here There Be Monsters

The chance to play god in an alien world with a genetic stewpot of possibilities offers a powerful siren song to many gamers, especially when you can turn your monstrous creations loose to wreck havoc in the environment. The action elements of Darkspore and the evolving storyline make it something like a science fiction story in which gamers become deeply immersed.

The game itself has a number of unique elements. Maxis Graphics Engineer David Lee Swenson commented, “There are not a whole lot of games in this genre. And, I really haven’t seen anybody take an approach that’s quite like ours. Darkspore lets you choose from a deck of characters and build a squad of three guys who work together. Even if you’re in single-player mode, you can switch between the abilities of the other two characters whenever you need to—to cope with certain situations. I think that’s very compelling.”

Intel GPA reveals darkspore creatures in their best light

“I also like the way the game lets you push your luck. If you’re playing co-op with your buddy, you’re trying to clear a planet and if you do there are rewards at the end. You can take the loot you won or you can bet it all to continue—but you must make it past the next planet alive. That’s kind of addictive and it is quite fun.”

Alec Miller, a graphics engineer at Maxis, said, “Spore was a massive single-player experience. With Darkspore we have really put a lot of effort into the multiplayer experience and into making it fun to play with your friends, working through the levels while fighting, to win the loot.”

Intel® GPA Gains Recognition

As the Intel® Graphics Performance Analyzers (Intel® GPA) gain increasing recognition in the developer community and become a staple in many developer’s toolkits, the industry as a whole is taking note. Intel GPA was recently nominated as a finalist for the 2010 Game Developer Front Line Awards. The ability of Intel GPA to fit comfortably into the daily programming workflow and perform “what-if” scenarios to explore the options in a program’s graphical environment make it extremely useful on a day-to-day basis.

Soon to be available in version 4.0, with a number of new features that extend its usefulness, Intel GPA helps developers optimize games for Intel® Graphics components and PCs powered by 2nd generation Intel® Core™ processors. With this level of optimization, game title sales can reach more deeply into mainstream desktop and mobile computing market segments, delivering satisfying visuals and responsive game performance. For more details on the new features in Intel GPA 4.0, check the Intel Graphics Performance Analyzers page: www.intel.com/software/gpa/

Visual Adrenaline developer program members can download and use Intel GPA for free. For answers to the top frequently asked questions about Intel GPA, visit the online FAQ.

Simplifying the Complexity of Graphics

Gamers are accustomed to a certain level of visual realism in modern computer games, and a game that doesn’t meet these expectations is unlikely to win favor with gamers or earn positive reviews. The challenge for developers is to enhance the graphics realism and degree of detail as much as possible without overburdening the computer hardware.

Intel GPA lets developers both hone in on those areas where the graphics are too complex to render at reasonable frame rates and to experiment with simpler graphics, moving toward a suitable balance point where the trade-off between detail and processing workloads is about right. This capability of detecting graphics “hotspots” in the game environment has earned Intel GPA a permanent spot in the toolkits of many game developers. Accordingly, Game Developer magazine included Intel GPA as a nominee in the 2010 Front Line Awards.

Miller noted, “I think that’s one thing we discovered with [Intel] GPA: just looking at our creatures—who are these high-polygon creatures—and realizing that the entire scene took about the same amount of time as it did to render just a few characters. That inspired us to add some character and terrain LODs and to reduce the polygon count on the creatures so they work better on the low-end systems.”

“Actually, we discovered a lot of different things using Intel GPA,” Swenson said. “We have a force level called Verdant. And Verdant is an especially bad performer because it’s slow—the place is just littered with trees and plants. And, not surprisingly, the trees and plants showed up in our Intel GPA analysis as a graphics bottleneck.”

“Interestingly enough,” Swenson continued, “you’d think that it would all be fill and it wasn’t. The wind shift and calculations were actually a problem, as well. These plants are actually quite expensive, graphics wise. We’re running some content full deferred, but for this level it looks as though it would be a win to run the plants full deferred. And so we might be doing that as a direct result of the [Intel] GPA feedback.”

Intel GPA reveals darkspore creatures in their best light

Other areas noted in the graphics analysis where streamlining looked promising included scaling back the global lighting to trim back cloud shadows and parallel lights, making changes to the Z-range calculations for the shaders, and similar kinds of optimizations. By being able to analyze the individual graphics instructions and determine how much time they take to execute, the developers can cast off the excess baggage that doesn’t justify its use in the game and graphics operations that drag down the frame rate excessively.

Intel GPA reveals darkspore creatures in their best lightAs in most 3D game environments, each of the creatures in Darkspore consists of an intricate mesh of triangles. Intel GPA provides an analytical means to visually pinpoint areas of extreme graphics complexity and indicate the higher processing times to render the models. During the development process at Maxis, Intel GPA helped the artists quickly determine the number of triangles being used for the characters in each scene and reduce the detail throughout the game without significantly affecting character appearance or visual quality.

As shown in Figure 3, the original tight woven mesh of triangles was extensive— beyond the number necessary to render the characters in a way that would retain visual fidelity. Simplifying these triangles contributed to a huge payback in the game performance whenever these characters appeared on-screen.

Integrating Parallelism into the Code

Multi-threading has become an essential technique to achieve responsive 3D game play on multi-core processor platforms. Maxis did not overlook opportunities to tap into available cores and perform operations in parallel when possible.

Intel GPA reveals darkspore creatures in their best light

The nature of Darkspore, which gives gamers the option to add body armor, weapons, and other capabilities to their characters, requires that each individual character be represented by its unique set of characteristics, basically an archetype.

Intel GPA reveals darkspore creatures in their best light

Swenson noted, “In order to deal with different body parts and creature mods, we have to have an entire archetype line inside the running game. And this archetype line takes your creature, charts the maps, and does all the baking. Doing this efficiently required multithreading— to be able to do it in the background. To run it smoothly, we’ll look at the PC’s processor and determine how many threads, hyper-threads, and cores are available, and that’s what we’re going to use to perform all these tasks. We’ll scale up to however many the PC has available. So, that’s one place where multi-threading is key.”

Intel GPA reveals darkspore creatures in their best light

“Basically,” Swenson continued, “all the steps in doing this building—from skinning and charting to creating meta-walls and painting—are splayed out into jobs that are dependent on each other. To accomplish these tasks as quickly as possible, they are kicked off on a job manager and doled out to the job manager’s worker threads based on what kind of resources we have.”

Because of this design philosophy, based on distributing tasks to available cores and threads in each gamer’s PC, Darkspore takes advantage of the current crop of processor platforms and has built-in scalability to perform even more efficiently on future systems that will have more processor cores. Performance improvements are essentially built into the code.

Shaping Efficiency in the Graphics Realm

In support of the code development for Darkspore, Intel GPA provided the team with practical, immediate visual feedback on the entire graphics environment. The techniques used by the Maxis development team showcase the flexibility and usefulness of Intel GPA, enabling teams to spot and fix graphics complexities that are slowing game play and compromising playback performance. Maxis was able to make numerous changes in their 3D models and code to trim extraneous detail and inefficient sequences to obtain very good performance on even modest systems using integrated graphics.

Effective use of available processor cores is another key to responsive game performance. Parallelism is becoming more integral to elegant, efficient programming year by year. Maxis successfully developed the code for Darkspore to take advantage of additional processor cores in a number of places. For example, the processor-intensive work required to generate and build creatures is performed as a background process using an independent thread. Similar examples illustrate the benefits of skillfully implemented multi-threading to unlock the full performance potential of a game.

One notable object lesson emerged from the development work on Darkspore: Satisfying gamplay can be experienced on systems with the new processor graphics of the 2nd generation Intel Core processors. Major advances in processor graphics capabilities have broken down many barriers to rich game play on mainstream desktop and laptop machines. The release of Darkspore, optimized for playback on a broad range of platforms, offers a perfect example of how graphics have expanded to fulfill the needs of a much broader segment of the market. For Maxis, this opens an opportunity to reach millions of additional customers with their title release

About the Author

Lee Purcell writes about technology topics and alternative energy from a pleasant outpost in rural Vermont.

--------------------------------------------------

Sign up today for Intel® Visual Adrenaline magazine: http://va.softwaredispatch.intel.com/ »