Developer Journals

Developer Journal: Defrag

Posted 1 decade ago Lead Map Design
Some engine ramblings.

It's been months since I'd played CS:S (BF2 rules to the point where I don't play anything else now) and I'd been wondering just how Valve planned to release DoD:S with fancy lighting, large maps & sizeable player numbers given that the client animation system in Source is extremely sluggish. This has always been an issue in the development of FF and any other Source-based mod, as it meant one facet of the game engine (that was out of our control) was going to cause a huge framerate problem when many players were being rendered simultaneously (e.g. on AD, some CTF map areas around dropped flags and so forth).

So, it has come as a semi-surprise to me that Valve has now optimised the client animation SIGNIFICANTLY. I don't know exactly which update issued the changes, but my suspicion is that Valve obviously realised that DoD:S, complete with HDR, was going to be a bridge too far (wahey, WW2 movie pun!) in terms of performance unless they got the engine running more smoothly in other places.

To give you an example of the huge improvement in speed:

My computer:
Athlon 64 3200 @ 3800
2 gigs of PC3200 RAM
Nvidia 6800 GT @ Ultra

Before:
CS:S months ago: 20 player server, 10 people in respawn at the start of the map. The "Client Animation" field on the +showbudget panel would display as much as ~15-20ms. In essence, the game could not render faster than ~50 fps even if the other parts of the game were calculated & rendered in next to no time (as 1 sec = 1000 ms, 20ms per frame eaten up by client animation, hence 1000/20 = 50 fps).

After:
DoD:S today: 32 player server, ~12-16 people respawn after we take a point, then start running up the path. The "Client Animation" field on the +showbudget panel shows between ~5 and 8 ms! I thought "hmm, maybe they've just made the animations in a very conservative fashion, or just updated DoD:S with this change", so I went for a quick game of CS:S. Same thing in CS:S! The client animation is much, much faster. It's seems to be an engine-wide optimisation rather than any kind of trick.

So in conclusion: FF will no longer be constrained by this problem, and we will be able to potentially provide bigger maps, more players and smoother gameplay than before. I'm very glad, as the prospect of playing Attack & Defend maps with 30-40 fps on a good computer due to an engine problem didn't fill me with glee. Kudos to Valve for fixing the single-biggest gripe I had with the Source engine, but it does beg the question: "Why was it so badly implemented in the first place?".

Oh, and HDR is bloody gorgeous; DoD:S looks lovely. It's just a shame the clipping in the mod is absolutely atrocious. I've become stuck to other players and had to suicide on several occasions, and I've noticed that it's very easy to 'stutter' along when in remotely close contact with phys and player models. I hope they fix it soon, as it renders the game pretty much unplayable at times. When the HDR SDK content is released, we will definitely take a look at the time & effort it would require to enable HDR when playing FF. The majority of hardcore players would probably turn it off after a while, but it's a really nice and subtle effect when you're playing. Additionally, casual gamers tend to be drawn to pretty effects and it'll look great in AVIs. Providing it's not too much work (I've heard rumours that making the HDR-enabled skyboxes is a royal pain in the posterior) we may decide to implement HDR at some point. No promises, but we will look into it.

As for what I've been doing lately: I've been documenting certain things for the programmers, so I haven't had much chance to edit lately. Unfortunately, Hammer is crashing with alarming regularity, and I'm not sure what exactly its beef is. It's slowing down my work on bases, so I'm just throwing myself into other areas at present. Uni has also been taking a fair old slice of my time :)
View all developer journals