Wednesday, September 13, 2006

Optimizing Quake 4 for an X800.

Radeons aren't just for Half-Life.
by AC - permalink


I did a little more tweaking to Quake 4 recently and found a nice little sweet spot for my hardware. It's the best combination of high frame rate (45 to 60+ fps 90% of the time) and high-quality visuals I can come up with. This is basically a distillation of all the performance tweaks from the TweakGuides.com Quake 4 tweak guide, hand-picked and tested for this hardware:
  • AMD 64 3500+
  • 1024MB DDR 3200 SDRAM
  • ATi Radeon X800 XL PCI-e 256MB
  • Win XP Media Center, SP2
  • KDS 17" CRT
If your hardware differs slightly, you can guesstimate up or down accordingly. Here's my in-game setup:

As a baseline, I set the game to medium graphic quality. This sets up a good value for texture compression in addition to a number of settings (like AA, AF, etc.) that I overrode. Under Settings > Game Options, I disabled Show Decals, and under Settings > System > Advanced Settings, I enabled everything but anti-aliasing. After that, I opened the Quake4Config.cfg (by default, found under C:\Program Files\id Software\Quake 4\q4base) and made only five changes. You'll find three of them together:
seta image_useCache "0"
seta image_cacheMegs "100"
seta image_cacheMinK "30"
I changed these three strings to:
seta image_useCache "1"
seta image_cacheMegs "196"
seta image_cacheMinK "3072"
I also located 'seta r_multiSamples' and made sure the value was set to 0. It's a little counter-intuitive, but you really don't need any anti-aliasing in the Doom 3 engine at any resolution over 1024x768. Unlike any other game engine I have, you just won't notice the difference between 2X and none at all, aside from the significant framerate boost. The last change was finding 'seta image_anisotropy' and setting it at 4. This is a good compromise value at 1152x864, keeping fps high without the floors and walls looking like shit in the distance.

Everything else I implemented in an autoexec.cfg, which you should place in the same folder. Here's my entire autoexec:
seta com_allowconsole 1
seta com_videoRam 256
seta com_systemRAM 1024
seta g_brassTime 0
seta image_preload 1
seta r_orderIndexes 1
seta r_useShadowCulling 1
seta r_useStateCaching 1
seta r_useVertexBuffers 1
seta r_useCachedDynamicModels 1
seta r_useTwoSidedStencil 1
seta r_useTurboShadow 1
seta r_useOptimizedShadows 1
I'm running Catalyst driver set v. 6.8, controlled by ATi Tray Tools. I don't even have Catalyst Control Center installed anymore. I'm not using Tray Tools to change anything other than forcing vertical sync. With this setup, I'm running Quake 4 at 1152 with barely a hitch or stutter. The game stays at 60+ fps almost all the time, the only exceptions being some indoor areas with a lot of dynamic lights trying to interact with each other. The best part is that I'm making almost no sacrifices in visual quality.

Anyway, this is what works for me. Your mileage may vary.

Saturday, September 09, 2006

Call of Duty 2 vs. Call of Duty.

How do you feel about bump-mapping?
by AC - permalink


I've been playing Call of Duty 2 for a little over a week now. It's pretty damn good, but I have a problem with it. I've played Call of Duty and its expansion, United Offensive, to death. I love that game, and I'll probably be playing it until, like DOS games, an OS comes along that won't let me play it anymore. And it's hard to shake the feeling that CoD 2 is just another expansion for its prequel.

Just looking at the gameplay, there's no real upgrade at all. Healthpacks are gone in favor of a recharge system. I like it, because it gives you the freedom to charge into a fortified position - provided there's some cover nearby - without first scouting around for health you can backtrack to. But it's nothing that couldn't be done in the first game with a simple mod. The tank missions are back, and haven't changed at all. Using binocs to call in artillery strikes, and manning a mounted gun during a car chase on rails? Both back unchanged from United Offensive. Three episodes, one each with the American, Russian, and British forces? Check. And there's a total of two new weapons, both of which are exremely rare in the single player game. That's not counting two new mounted machine guns that are functionally indistinguishable from the old ones.

So what's new? Pretty much just the visuals, and that's only if you can run the game at a reasonable resolution and frame-rate in DirectX 9. In a very nice touch, Infinity Ward gives you the option of rendering the game with DirectX 7. This makes the game look virtually identical to Call of Duty 1, but also doubles or triples your framerate.

In DX7 mode, the game really does look like another CoD 1 expansion pack. But the good news is, it would be a really goddamn good expansion pack. While nothing really new is introduced, the maps are big and beautifully detailed, there are usually a number of varied objectives to each mission, and both friendly and enemy AI is much, much better. For the first time in a PC Call of Duty game, enemies won't just spawn indefinitely until you manage to advance to some magical, invisible waypoint. Instead, the maps have been carefully crafted to require you to advance to get the right angle or vantage point to knock out a finite, believable number of defending troops.

Now, if you can run the game under DX9, you'll see why it's more than just an expansion. I'm not sure why, but in DX7 mode, Call of Duty 2 actually runs better on my system than United Offensive at high resolutions. Under DX9, it runs even worse, forcing the res down to 1024x768. But it looks better that way, even with AA at just 2x and no AF at all. The bump-mapping brings all the map textures to life in a way the Quake III engine never could, but it's the character models that really sell the experience. Bump-mapping and specular lighting, combined with shadows you don't get under DX7, bring a feeling of realism to the game you just can't get from the original game.

But there is a catch. Out of the box, the game runs horribly on most hardware in DX9. You can either use an annoying in-game workaround or install the 1.3 patch. Going back to gameplay, there are a couple of reversions from United Offensive I don't understand. First, you can't "cook" a grenade anymore. You just toss it with its full three-second delay. This sucks even more given the new AI ability to pick it up and throw it back at you - which you can't do. Second, there's no mode-of-fire toggle now, so the Thompson and MP44 can't be switched to single-shot.

But it's still fun. I mean, look, it's more Call of Duty, and it's every bit as good as the original and United Offensive. It's also slightly longer, which is especially nice, as CoD 1 is so short it sometimes feels like an expansion itself. Overall, I say if you have a PCI-e vidcard with 256MB, just go buy it. It's worth playing, even in DX7.