Metrospective: 4A Games vs. Digital Foundry
Metro 2033's technical mastermind explains the game's post-S.T.A.L.K.E.R. technology.
The decision not to bring the title to PS3 came from THQ and the developer reckons it has made a positive difference to the game-making process, as limited resources are deployed on two platforms rather than three.
"THQ was reluctant to take a risk with a new engine from a new studio on what was still perceived to be a very difficult platform to program for - especially when there was no business need to do it," says Shishkovtsov.
"I think it was a wise decision to develop a PC and console version. It has allowed us to really focus on quality across the two platforms. One thing to note is that we never ran Metro 2033 on PS3, we only architected for it. The studio has a lot of console gamers but not that many console developers and Microsoft has put in a great effort to lower the entry barrier via its clearly superior tools, compilers and analysers.
"Overall, personally I think we both win. Our decision to architect for the 'more difficult' platform paid off almost immediately. The whole game was ported to 360 in 19 working days, although they weren't eight-hour days..."
Another key challenge in moving from PC across to console was the relative dearth of available memory. With 2GB being the minimum that desktop PCs tend to ship with these days, dropping down to less than 25 per cent of that amount for the consoles presented an awesome challenge. The solution was, of course, to stream in assets directly from the DVD drive - although like the vast majority of 360 titles, Metro 2033 will also run from hard drive via an optional NXE install.
"On the shipping 360 version we have around 1GB of OGG-compressed sound and almost 2GB of lossless compressed DXT textures. That clearly doesn't fit into console memory," says Shishkovtsov.
"We went on the route to stream these resources from DVD, up to the extreme that we don't preload anything, not even the basic sounds like footsteps or weapon sounds. We've done a lot of work to compensate for DVD-seek latency, so the player should never notice it. That was the hard part."
All of these optimisations mean that the PC version of Metro 2033 benefits too.
"We don't need as much system memory as other PC-only games. Anything above 512MB RAM with DX10/DX11 code-path on Win7 would be enough," Shishkovtsov says. "DirectX 9 uses system memory backing store for almost all GPU resources, so you should add around 256 MB to avoid page-file swapping.
"The CPU side is slightly more problematic. Because the system is heavily multi-threaded, we need at least two hardware threads for 'smooth' gameplay. The CPU performance doesn't matter that much, except on a few selected scenes during the whole game as long as it is relatively modern architecture (not Intel Atom!) and has more than one core."
Graphics-wise, the PC version of the 4A engine is far removed from the console versions. All too often we've seen PC games that are identical to the 360 equivalents, simply offering you the ability to run at higher resolutions with higher frame-rates.
Metro 2033 features superior volumetric fog, double the precision in the PhysX, 2048x2048 textures (up against 1024x1024 on console), better shadow-map definition and filtering, object blur in DX10, sub-surface scattering for superior skin shaders, parallax mapping on all surfaces and better geometric detail with less aggressive LODs.
There's also going to be support for tessellation in DirectX 11. In basic terms, tessellation interpolates new polygons, so the closer you get to a tessellated object, the more polygons are generated.
DirectX 11 is a huge leap over its predecessor and its many capabilities look set to be embraced by games developers, including 4A.
"I really enjoy three things: compute shaders, tessellation shaders and draw/create contexts separation," Shishkovtsov says. "The major thing that can up the performance is the compute shaders. Today, games spend the majority of the frame doing the various kinds of post-processing. The easy route to extract some performance is to rewrite that post-processing via compute.
"Even the simple blurs can be almost twice as fast. For example we've rewritten our depth-of-field code, to greatly enhance quality while still maintaining playable frame-rate. [In Metro 2033] all the 'organic' things like humans are tessellated, and monsters use real displacement mapping, to greatly enhance visuals."
Looking at the engine spec published on Digital Foundry yesterday, there are many similarities in terms of technologies with Guerrilla Games' epic Killzone 2: pretty much the standard other developers have to aspire to in the console realm when it comes to first-person shooters. Guerrilla's engine is quite remarkable, geared completely to the specific hardware strengths of the Sony platform, but Shishkovtsov evaluates its performance from a different perspective.
"Their implementation seems to be badly optimised," he observes. "Otherwise why do they have pre-calculated light-mapping? Why do they light dynamic stuff differently to the rest of the world with light-probe similar stuff? From our experience you need at least 150 full-fledged light-sources per frame to have indoor environments look good and natural, and many more to highlight such things like eyes, etc. It seems they just missed that performance target."
Playing Metro 2033, the huge amount of light sources rendered with the deferred shading pipeline definitely feels reminiscent of the Sony shooter, which uses its own deferred rendering solution.
"Speaking from the Metro 2033 perspective, it was an easy choice," Shishkovtsov replies. "The player spends more than half of the game under the ground. That means deep dark tunnels and poorly-lit rooms. There are no electricity sources apart from the generators. From the engine perspective - to make it visually interesting, convincing and thrilling - we needed a huge amount of rather small local light sources. Deferred lighting is the perfect choice."