Richard Jones' Log: Half-Life 2, more fun

Mon, 27 Dec 2004

I've been playing Half-Life 2 on and off since it was released. I've played it through twice, and have revisited several of the chapters numerous times. I particularly like going through (links go to walkthrough) Point Insertion, Water Hazard (so pretty), Highway 17 and Follow Freeman sections. Oh, and Our Benefactors, Nova Prospekt, Entanglement, Anticitizen One (Dog is so cool :), We Don't Go To Ravenholm, etc. :)

Xander got me Half-Life 2: Raising The Bar, which I had great fun reading.

The experience hasn't been perfect though - I've been occasionally hit with the "stuttering" problem reported early on. It manifests on my system as an occasional hit on the frame rate - a pause of about half a second, or sometimes several in a row. It was pretty obvious that there was some problems with disk access, loading new sounds to be played. A number of solutions were offered, and Valve have been working on making their code better (apparently in some cases removing a bajillion open() failures while opening some sound files -- I've been hit with that type of bug before myself :). Their latest fix helped my system a fair bit, but I still got the occasional "stuttering" in the trainstation opening sequence, when disembarking the train (one of the most common places, as there's a lengthy speech by Dr. Breen).

I'm on holidays at the moment, so I've had some time to really look into the problem. I poked around the various HL2 forums and found some clues as to the possibilities. I installed the latest beta nVidia drivers for my card, which helped a little. I installed the latest mobo drivers (I have on-board sound), which didn't seem to change anything. The main culprit turned out to be my slow disks (slow ATA-66) in combination with a fragmented filesystem. Once I defragmented* the filesystem, things sped up considerably, and I haven't noticed any "stuttering" since.

*: does the default Windows XP disk defrag program blow chunks or what? I looked around for a third-party tool, but they all appear to be "enterprise" level, hence expensive. In the end, I had to practically hand-hold (ie. run and re-run defrag, move some files around, re-run, move files off the disk and back on again) it so it would actually defrag some of the larger HL2 data files. Sigh.

Comment by Garth T Kidd on Mon, 27 Dec 2004

Check out contig from; it'll partially defragment a file if it can't completely defragment it. If you've got a few big files with a few thousand fragments each, running contig across your drive a few times before using the inbuilt defragmenter will save you buckets of time. If you can't be bothered waiting for the full contig sweep, the inbuilt defragmenter's analysis function will tell you which files are the most fragmented so you can run contig over them.