Half-Life 2 as a benchmark
For many years, confirmed gamers and simply "amateurs", theorists of the industry, and simply anybody slightly familiar with the notion "3D game", have been anxiously waiting for the release of Half-Life2. Around this without doubt most anticipated game of 2004, there were so many assumptions, sometimes fabulous (as it seems now), so many hopes, intrigues that it makes no sense recalling them all - so many of them piled up during wearisome waiting time.
Rumors were accumulated, intrigues swirling around.. The eternal arguments among those close to the industry and simply those keen about the current situation on "ATI vs NVIDIA" front finally developed into the discussions "DOOM3 versus Half-Life2" be it in lobbies at a presentation, or at a party over a "wineglass of coffee", or in the analyses of reviewers in the materials of relevant subjects. Awful lots of middling test results produced with whatever alpha-versions or other "stress tests" flooded the Internet.
Of course, those skeptical (especially zealous fans of DOOM 3) may argue for as long as they like about "which game was the top thrill to the public in 2004", but you'd better had a look at the conferences where games worldwide share their views which give a most impartial idea of the votings which we gathered quite recently.
Finally, it's there and at last we can get round to sorting out in the heap of assumptions, rumors, intrigues and preliminary results. We now can assess the new creation of Valve from professional viewpoint, that is, to run performance tests for almost all the modern cards by ATI and NVIDIA at the most long-awaited game of year 2004.
We start with finding out the fine points in the methodology of tests.
Half-Life 2 is very recourse-hungry in terms of the video card performance, it makes intensive use of shaders, and it can't be ignored as a new benchmarking environment. Half Life 2 allows recording real gaming scenes (timedemos). With the recorded timedemos, you can assess various aspects of the Source engine and produce the most precise and impartial readings of the graphic performance.
Half-Life 2 benchmarking How-To:
For high-end video cards, Half-Life 2 shows extremely high FPS (over 200 fps in some scenes). Graphic rendering is more dependent on the processor resources rather than other components. For HL2, a super-powerful processor is a must! Such demanding processor requirements are vital for handling the advanced physics, details processing, AI, mimics, networked data exchange etc.
To produce a precise performance picture in Half-Life 2 as a benchmarking environment, a scene of FPS = 50 or lower should be used. This creates a performance scenario where a 10 fps difference between boards (or between settings) will significantly impact the user experience. The Canal map make heavy use of whatever shaders. Reflection and refraction on the water surface required numerous complex shaders.
Before recording your own demos, make sure to verify that performance changes as the graphics settings (resolution, AA, etc.) are altered.
- Valve’s color-coded framerate counter (“cl_showfps 1”) is very useful for developing your own timedemos. Green means fast, yellow means moderate, and red means slow. Look for content that drops into yellow or red at least occasionally. Otherwise your test will very likely be CPU-bound.
- Make sure Steam is not downloading in the background while you run benchmarks. The extra CPU load will distort your scores.
- If you (physically) disconnect your benchmark computer from the internet, Steam should give you an option to stay offline for the duration of your testing.
- To ensure the best experience, it is recommended that you install the most recent CATALYST and ForceWare driver versions, albeit in their beta-versions. ATI and NVIDIA are currently working hard at optimizing whatever can be improved in games like DOOM3 and HL2.
Benchmarking from the console
Most of the commands required for benchmarking Half-Life 2 are available inside the game, from the console. Here you can load maps, record timedemos, and play them back to measure performance. To enable the console from inside Half-Life 2, use the menus:
Options -> Keyboard -> Advanced -> Enable Developer Console
You can easily localize your English-language retail version of the game. For that, enter the settings of the Steam engine via the menu and choose your language. Absolutely everything is localizable - game interfaces and even speech. The amount of downloadable content will be large enough.
The ‘~’ key will open the console.
Console Commands for Half-Life 2:
|bind key command
||Attaches a command to a key. Useful for “record” and “stop” functions when creating timedemos. (e.g. bind f1 "record mytimedemo"”)
||Turns on the on-screen framerate indicator.
||Loads the desired map (e.g. map d1_canals_09)
||Plays a demo at normal speed (i.e. not in “timedemo” mode)
||Records a demo of all the user’s actions within the game until the “stop” command is issues.
Half-Life 2 does not auto-increment the demo name as you record new demos. If you bind a key to the record function, be sure to re-issue the bind command with a new demo name before each use. Otherwise, Half-Life 2 will overwrite your existing demo. The “.dem” files appear in the “HL2/HL2” folder.
||Saves a screenshot in the Half-Life 2 folder. i.e. “C:ValveSteamSteamAppsemail@address.comhl2hl2screenshots” Screenshots are saved in .tga format (texture files)
||Stops recording the current demo
||Plays the recorded demo as quickly as possible, and reports an average framerate in the console. Results are logged to the hl2hl2source.csv file.
||Plays the recorded demo as quickly as possible and exits Half-Life 2 once complete. Results are logged to the hl2hl2source.csv file. This command is useful for automated testing.
To record your own demos, proceed as follows:
- Start the game
- Enable the console by pressing the '~' key.
- Load the desired map: "map" name and press the spacebar - this will display a whole list of all available maps
- Practice with the map and when you are ready enable the console by typing "record demo__name" - and here you are.
- Stop recording - "stop"
The "map"command is very useful if you wish to browse around the maps without walking through the whole game. Use of the console allows tampering and cheating a lot with the game. After all, the console was developed just for debugging the program. For a complete list of cheat codes, look here: Half-Life 2 - Cheats
Benchmarking from the command-line
There are some issues with running multiple Half-Life 2 tests back-to-back from a batch file. A timedemoquit option is available (which exits Half-Life 2 once the timedemo is complete), but since it is Steam that launches HL2, and Steam does NOT exit at the end of the timedemo, you will find your batch sitting waiting for you to shut down Steam after each run.
There are, however, some benchmark-related functions which are not easily accessible from inside the game. “Nosound” and “DXLevel” are examples. To gain access to these options, create a shortcut to Half-Life 2 (see “Desktop Shortcut” section), and add the desired options at the end of the command-line in your shortcut.
You may also find it convenient to create several different shortcuts, one for each of your desired combinations of resolution, AA/AF and timedemo.
Command-Line Arguments for Half-Life 2
||Allows access to the Half-Life 2 console while in the game (press ~)
||disables sound during the timedemo (note: some sounds are still played as the game launches)
||Sets the horizontal resolution
||sets the vertical resolution (i.e. “-width 1024 -height 768”)
||sets the Multi-Sample Anti-Aliasing mode (0, 2, 4, 6).
||sets the Anisotropic Filtering level ( 1 == none, 4, 8, 16)
||Plays the recorded demo as quickly as possible, and will report your framerate. Results are logged to the hl2hl2source.csv file.
||Plays the recorded demo as quickly as possible and exits once complete. Results are logged to the hl2hl2source.csv file. This command is useful for automated testing.
||Forces your hardware to run a specific shader path (90, 81, 80), if it is capable. This is useful for apples-to-apples comparisons testing on products (such as the GeForce FX line) where DirectX® 9.0 is not the default shader path in Half- Life 2. That is, “–dxlevel 90” forces DX 9.0 shaders, while “-dxlevel 81” runs 8.1
||Enables (1) or disables (0) a depth fill pass that may improve performance in graphics-bound (high resolution, or AA + AF) situations. Currently, NVIDIA products default to ON, while ATI products are OFF (based solely upon ASICID recognition).
Be sure to specify +mat_antialias 0 and +mat_forceaniso 1 for any noAA noAF tests run from the command-line. If you don’t specify a value for these options, Half-Life 2 will use the currently configured settings from the in-game control panel (and these might not be “disabled”). See “Automatic Configuration”.
For benchmarking, we recorded our own demos using the maps "d1 Canals 09" (canal-3dnews.zip - 1,5Mb) and "d1 Trainstation 02" trainst-3dnews.zip - 1,4Mb. The so-called "ATI's official demos" that caused a wave of accusations of cheating no longer work in the current version of HL2.
Calculating water shaders from the first demo makes heavy use of reflection and refraction on the water surface. The helicopter kicks up a spray that is alpha blended, and the sun flare is also blended into the scene.
Performance here is primarily limited by the water shader. The technical comment on HL2 suggests that this map makes use of at least five effects:
- bump mapping;
- Fresnel effect;
- Murkiness is handled with volumetric fog.
The incredible detail of Half-Life 2 is apparent in this scene of a city square (the "trainstation" map in the second demo). The architecture is almost photo-realistic. Watch the windows on the train station for a reflection effect.
This scene is somewhat CPU-bound on higher-end hardware.
We are now moving on to the benchmarking, but before we start, - a few tests to measure the effect of the audio subsystem, memory, and the processor.
||CPU & Memory: