CHAPTER How PC Games Affect Performance

13
PART PART I I Welcome to Welcome to the World of the World of PC Games PC Games Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 / Chapter 1 P:\010Comp\BlowLid\637-4\ch01.vp Thursday, September 12, 2002 1:51:47 PM Color profile: Generic CMYK printer profile Composite Default screen

Transcript of CHAPTER How PC Games Affect Performance

CHAPTER1How PCHow PCGames AffectGames AffectPerformancePerformance

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

33

P:\010Comp\BlowLid\637-4\ch01.vpThursday, September 12, 2002 1:51:51 PM

Color profile: Generic CMYK printer profileComposite Default screen

44

Modern games are among the most demanding applicationsyou can run on a PC. While some applications may

stress a particular subsystem more than others, a demanding PC game can stress ev-ery subsystem within the PC, with the possible exception of hard drives and opticaldrives. Even then, you need a pretty fast hard drive to load levels or maps if you don’twant to spend a lot of time waiting for parts of the game to load. Some games con-sume vast amounts of hard drive space—Baldur’s Gate II, as an example, takes up 2.2gigabytes of hard drive space with a full install.

Before we can begin to upgrade, buy, or build a custom PC to accommodate thegames we want to play, it helps immensely to understand why games are so demand-ing—although it’s certainly true that not all computer games are equally demanding.For example, the puzzle game Bejeweled (Figure 1-1) became a huge hit last year.

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

F I G U R E 1 - 1

Bejeweled will run on almost any PC with a color monitorand Windows.

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:12:55 PM

Color profile: Generic CMYK printer profileComposite Default screen

55

Originally played in a web browser, a standalone version was offered in early 2002.It could even run well in older systems.

Moving up the spectrum a bit are games that are actually designed to run reasonablywell on low-end systems—yet even some of these titles are fairly sophisticated. Onehuge hit in the last couple of years was Will Wright’s The Sims, shown in Figure 1-2.The Sims sold more than a million copies and would run well on a 233MHz Pentiumwith 64MB of RAM—definitely a low-end system by today’s standards. Yet The Simsis a breakthrough title, both for its mainstream appeal and its sophisticated AI (artifi-cial intelligence).

Nevertheless, an increasing number of titles are extremely demanding on systemresources. Examples of these types of games include flight simulators, real-timestrategy games, and role-playing games set in 3D virtual worlds. One example ofthis last type of title is Bethesda Softwork’s Morrowind, shown in Figure 1-3.Morrowind is a fantasy role-playing game set in a completely realized, virtualworld, populated with fantastic creatures, images, and characters with their ownagendas and needs. Although it will run on a “mere” 700MHz PC, the bestMorrowind experience requires a very fast Pentium 4 or Athlon system using thelatest 3D graphics hardware.

C H A P T E R 1

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

How

PCG

ames

Affe

ctPe

rform

ance

F I G U R E 1 - 2

The Sims offers state-of-the-art AI in a game that runs wellon modest hardware.

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:12:57 PM

Color profile: Generic CMYK printer profileComposite Default screen

Game designers spend a lot of time estimating what level of PC performance willbe required to run a game. Some of that effort requires a certain amount of crystalball gazing. A too-conservative guess results in a game that doesn’t look as good, orone that doesn’t offer as rich an experience as that of the competition. Taking anoverly aggressive development posture delivers a title that runs poorly on even thefastest hot-rod PCs available and results in many product returns, which can be thedeath of a game company.

If we understand a bit about how game designers wrestle with these issues, it willhelp us understand what we need to do to plan for system upgrades or purchases.Let’s take a look at the different facets of a typical PC game.

ASPECTS OF PC PERFORMANCE

When most gamers think about PC performance, they often think about the conceptof “frame rate”—how many frames per second the system is generating. This is a bitdeceptive, though, because people believe that it’s the graphics card that’s mostly re-sponsible for performance. While graphics hardware is certainly important, we needto consider several other key areas when evaluating system performance.

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

P A R T I66W

elco

me

toth

eW

orld

ofPC

Gam

es F I G U R E 1 - 3

Morrowind is one of the most performance-intensive titlesfor the PC.

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:12:59 PM

Color profile: Generic CMYK printer profileComposite Default screen

77

Graphics

Whether the game is a fully realized, 3D virtual world or a simple, 2D map, the visualelements of the game are the most immediate in our experience. Graphics invite usinto the game, keep us interested, and act as our portals into the virtual world.Graphics dictate the overall look and feel of the game, too, whether the bright, funcolors of Rollercoaster Tycoon or the dark, brooding world of the conspiracy theorythriller Deus Ex.

Today, much of the focus on graphics is on 3D graphics. The advent ofhigh-performance 3D graphics hardware enables the creation of 3D virtual worlds.The 3D graphics allow us to “move” through the world in any direction we choose,just as we exist in a true 3D world outside of the computer. You’ll read more about3D hardware later in the book, but as noted in the Introduction, 3D graphics haverevolutionized PC gaming in the last few years.

At first blush, it would seem that a fast 3D hardware takes care of high-end graph-ics needs, but part of the computation of 3D animation and graphics still occurs onthe CPU. For example, collision detection, which tells the game when one object runsinto another, is handled by the CPU. Note that collision detection merely determineswhen two objects may try to occupy the same space. The resulting physical interac-tion of the objects is handled by the physics engine, which is covered soon.

Audio

Audio in interactive games has become increasingly sophisticated. In fact, somegames, such as the critically acclaimed Thief 2, require audio to be able to play thegame. The sound effect cues in Thief 2 give clues to the player as he sneaks throughvarious environs, allowing him to avoid the baddies. Morrowind, mentioned earlier,offers superb surround audio, so that characters moving or talking to one side or be-hind you actually sound that way—provided you’ve got a surround speaker setup orheadphones.

Most PCI sound cards handle some aspect of the audio processing, but there’s anincreasingly important role being played by “soft” audio—sound that’s generatedand controlled by the PC’s main processor.

Physics

The term physics is a catchall word used to describe the behavior of objects movingthrough and interacting with other objects in the virtual environment. Don’t think ofphysics as necessarily adding “realistic” motion. Some games do strive for realisticphysical behavior, such as flight simulations and true racing simulations. Othergames often alter the laws of physical behavior either to streamline gameplay or easethe burden on the CPU.

C H A P T E R 1

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

How

PCG

ames

Affe

ctPe

rform

ance

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:12:59 PM

Color profile: Generic CMYK printer profileComposite Default screen

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

P A R T I88

Wel

com

eto

the

Wor

ldof

PCG

ames Currently, physics calculations are the exclusive purview of the CPU. As games

have become increasingly more sophisticated in the way they model the behavior ofobjects in the virtual world, more CPU cycles are needed.

Artificial Intelligence

Artificial intelligence (AI) is another catchphrase that describes a variety of activitiesin a typical game. The two most visible components of AI are opponent behaviorsand pathfinding.

Opponent behaviors can actually be extremely complex. While each character oropponent may have a set of AI behaviors specific to it, there’s also tactical AI (how agroup of individual units behave in small numbers) and strategic AI (prosecuting thehigher level game in order to “win”). Also, it’s not just the characters that may be ac-tive—it could even be the landscape. For example, in Bungie’s highly regarded Xboxaction game Halo, shown in Figure 1-4, the terrain is invisibly “marked” with firingpoints. Either friendly or AI opponents fire from these locations and also advance orretreat to them.

Pathfinding is another problem that falls under the purview of AI. All of us havewatched a unit in a real-time strategy game bump up against an obstacle—a verticalwall, say—and then keep bumping against it over and over again in a vain attempt toreach a destination on the other side of the wall. This illustrates the problem ofpathfinding, which is the art of moving units from point A to point B, with the possi-bility of intervening terrain or other obstacles getting in the way. The problem has ac-tually gotten much more complex as strategy games have begun to use true 3Dterrain. Today, it’s simple to move a unit around a wall. But how does the program-mer handle rolling terrain? Do you want the unit to take the most efficient path or theone with the best concealment? How do you define concealment? Maybe you wouldrather have the units take the high ground, to get a firing advantage. Realistic terrainadds substantial complexity.

While AI calculations are handled by the CPU, memory plays a factor, too. SomeAI routines can eat up large amounts of memory, and you may either see better per-formance or even smarter AI if you add memory.

Case Study: Dungeon Siege

There’s a lot more happening than graphics, sound, physics, and AI when a game isrunning. Usually, a big database or table is constantly updated as parts of the game’s

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:12:59 PM

Color profile: Generic CMYK printer profileComposite Default screen

99

How

PCG

ames

Affe

ctPe

rform

ance

C H A P T E R 1

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

How

PCG

ames

Affe

ctPe

rform

ance

universe changes. You may never see the effect of a particular change, but it’s stillhappening in the background.

User input and other I/O software is running all the time, too. The game needs toknow—and know quickly—when you click the mouse or press a key on the key-board. The game also needs to monitor incoming network packets (for multiplayergames). The game needs to know when to load or discard game objects or levels. Allof this takes CPU cycles and memory.

Dungeon Siege, shown next, is a hybrid action/role-playing game developed byGas Powered Games and published by Microsoft. Unlike similar games, playersdon’t encounter game “levels,” which are discrete parts of a 3D world. Instead, Dun-geon Siege’s expansive 3D world is constantly streaming through the system, so new

F I G U R E 1 - 4

Halo’s AI uses cues built into the landscape by programmers;the AI characters only shoot or move to these cue points, whichare shown as small squares in the picture. (Courtesy ofMicrosoft)

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:13:00 PM

Color profile: Generic CMYK printer profileComposite Default screen

areas are preloaded ahead of time. You also can’t “escape” into a new level—anyonepursuing you will continue to follow you into a new area.

This makes Dungeon Siege a balanced game when examined from the perspectiveof PC performance; it pushes all aspects of a PC system pretty hard—graphics,sound, memory, memory bandwidth, and CPU.

Let’s take a look at the minimum requirements for running Dungeon Siege:

� 333MHz Pentium II or better

� 128MB of system memory

� Graphics card with 8MB of video memory

� DirectX 8.0-compatible sound card

� 56KB modem or better for online multiplayer

� Windows 98 or later

One question many gamers have is this: “How do game developers determine theminimum requirements?” In fact, many are suspicious that the minimum require-ments are simply slapped on by the marketing department to sell more copies. Whilesome games do print optimistic minimum requirements, it’s often not in the pub-lisher’s best interest to overly minimize the system needed to play a game, because theend result is often support calls or games returned to the retailer.

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

P A R T I1010

Wel

com

eto

the

Wor

ldof

PCG

ames

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:13:01 PM

Color profile: Generic CMYK printer profileComposite Default screen

1111

How

PCG

ames

Affe

ctPe

rform

anceAs it turns out, determining minimum requirements is a combination of crystal

ball gazing, understanding the design goals of the game, and consensus by the devel-opment team. As Bert Bingham of Gas-Powered games put it, figuring out the mini-mum system “was an iterative process, based initially on a stake in the ground whichthe engineers and designers aimed at. After that, testing adjusted the requirementsslightly toward what the game eventually became. Fortunately, the game came outvery close to the initial target.”

Earlier, we looked at performance from the perspective of what a user sees. Graph-ics is pretty obvious, and physics is observable, as when an arrow flies through the air.AI isn’t often as obvious. Also, AI doesn’t just refer to opponent AI, but to the actionsof the other members of your party, since you can’t always control them directly. Forexample, when a party member’s health drops below 50 percent, a friendly party mem-ber with an active healing spell will automatically heal the distressed character.

Game programmers often look at performance differently and will break down thematter into even more granular components. For example, the main event loop (aka,“the primary thread”) or list of tasks that the game engine has to perform to keep thegame running for Dungeon Siege is broken down into the following subsections:

C H A P T E R 1

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

How

PCG

ames

Affe

ctPe

rform

ance

MiscRender UIUpdate UIRender EffectsUpdate EffectsRender TerrainLight TerrainRender ModelsLight ModelsDeform ModelsAnimate Models

Render MiscAI QueryAI MiscGODB (Game Object DataBase)Path FollowsLoad GOs (Game Objects)Load TerrainLoad TexturesFuelTriggers

Some of the subthreads are pretty obvious, such as “render models” or “load tex-tures.” Others aren’t quite so intuitive, such as “fuel” (which is part of the game’s mem-ory management subsection). Suffice it to say that the performance of each section iscarefully tweaked and prodded to get the maximum performance out of your system.

But if the game runs well on the minimum required system, why bother with afaster PC? It’s simple: you get a better experience running the game on a faster sys-tem. With a 333MHz Pentium II and an 8MB graphics card, you’ll be running thegame at low resolution (640×480), and in 16-bit color. In addition, you’ll see the per-formance of the game slow down quite dramatically in combat involving many ene-mies—enough so that character control can be problematic. Luckily, Dungeon Siegeallows you to pause and give orders while paused.

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:13:02 PM

Color profile: Generic CMYK printer profileComposite Default screen

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

P A R T I1212

Wel

com

eto

the

Wor

ldof

PCG

ames On a fast system with a 64MB 3D card and a good sound card, you can turn up the

resolution, increase graphics features (such as better quality shadows), and improvethe quality of the audio.

GENRE ISSUES

The final point to make is that different genres and types of games have differing ef-fects on system performance. But you can use some rules of thumb to help under-stand how a particular type of game might perform on your system.

� First person shooters (such as Medal of Honor, No One Lives Forever 2,or Unreal Tournament 2003) and other “twitch” action games tend to beextremely graphics intensive. Many of these types of games tend to pushleading edge 3D hardware pretty hard.

� Simulators of different types—including driving and flying simulators—tend to be heavy CPU users. While some simulators have gorgeous graphics,there’s a lot of CPU work going on under the hood, including some seriousphysics and AI calculations. Flight simulators, in particular, are among themost CPU intensive game titles available.

� Strategy games also tend to be more CPU heavy than graphics heavy.There’s a lot more AI going on in many strategy games. In particular, therequirements of real-time strategy games also consume large amounts ofsystem memory.

� Modern computer role-playing games can also be very demanding. Just acouple of years ago, role-playing games were considered to be “trailingedge” in terms of technology usage. However, that’s changed radically inthe recent past. Games like Morrowind, Dungeon Siege, and NeverwinterNights push graphics, CPU, and memory pretty hard. About the only areawhere simulators are still more demanding is in the area of realistic physics.

These rules of thumb are just that: rules of thumb. Today’s PC games often don’tfit neatly into a single genre, and some recent titles have blurred the lines betweengenres. Is Deus Ex a role-playing game or a first-person shooter? Is Heroes of Mightand Magic IV a strategy game or a role-playing game? Is Ghost Recon a first-personshooter or a tactical combat simulator?

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:13:02 PM

Color profile: Generic CMYK printer profileComposite Default screen

1313C H A P T E R 1

Blow the Lid Off! / The Extreme Gamer’s PC: A Gamer’s Guide to Ultimate PC Performance / Case / 222637-4 /Chapter 1

How

PCG

ames

Affe

ctPe

rform

anceThat’s not to say that you need the world’s most bleeding-edge computer to have a

fun, immersive experience. For one thing, not all games push the technology enve-lope. For every Dungeon Siege, there’s a Diablo II with significantly reduced systemrequirements. Or, if you’re willing to give up some eye candy or raw performance,you can still have fun. Who needs 240fps (frames per second), anyway?

However, the point of either tweaking or upgrading your system isn’t necessarilyabout getting a high frame rate. If you have a system that gets 240fps in Quake III, forexample, it might only wring out 100fps in Jedi Knight II, 55fps in Serious Sam, and40fps in Unreal Tournament 2003. And even then, it might not be able to adequatelyrun the next generation titles that push the technology really hard. No hard and fastrules determine what constitutes “enough” frame rate, and again this is essentially afunction of genre. You generally want first-person shooters running at 60fps, butflight or driving simulators run fine at 30fps, and strategy games can still be playableeven at 15fps. Frame rate determines how gameplay feels, and insufficient frame ratewill make gameplay feel sluggish and unresponsive, which is why smooth frame ratesmatter to gamers.

Don’t fear, gentle reader. This book is not about building a single, killer gamingrig that will take on all games. Rather, it’s about developing a strategy for keepingyour PC relatively up to date with less money than the average national budget. Let’sbegin, shall we?

P:\010Comp\BlowLid\637-4\ch01.vpTuesday, September 10, 2002 3:13:03 PM

Color profile: Generic CMYK printer profileComposite Default screen