The Making of Crysis 2

Digital Foundry talks with Crytek on Crysis 2, CryEngine 3 and beyond.

It's been just over three weeks since Crytek released its first proper game in three years. With Crysis 2, the Frankfurt-based developer has delivered a technically excellent, graphically superb shooter that is groundbreaking in many respects. It delivers state-of-the-art visuals, effects and physics onto five-year-old console architecture, and in stark contrast to its predecessor it manages to run extremely well even on relatively middle-of-the-road PCs.

The original Crysis scaled up to challenge the future of PC hardware, a hugely rich experience that could only be savoured at its best by enthusiasts pushing their kit to the limit. In many ways it was a game that evolved in line with the advances in PC hardware. In contrast, Crysis 2 delivers a more targeted, finely honed product that somehow manages to deliver the firm's "Maximum Game" ethos to mainstream gamers.

But why kick off with Crysis 2? With the power of CryEngine 3 at its disposal and two games' worth of pre-existing assets and gameplay available, why not bring the original Crysis and its Warhead spin-off onto console?

"We wanted to move on to our next game and come up with a fresh setting to further develop the Crysis franchise," explains CEO and president of Crytek, Cevat Yerli. "A port to consoles wouldn't have been easier or cheaper necessarily and we always want to innovate and thus offer improved and refined gaming experiences."

There is an argument that the setup of Crysis 2's environments might have made life a little easier for console architecture, but R&D principal graphics engineer Tiago Sousa reckons that tech didn't come into the equation. This was all about taking the game - and the developmental focus of the company - in new directions.

"It was a game design choice to move away from jungles which we have been doing for almost 10 years," he says. "This decision was completely unrelated to any technological issues. But from a technical perspective it was a nice change to go out of our comfort zone."

This is not to say that the migration of the franchise across from PC to multi-platform did not have a profound effect on the make-up of the game, however. There's budget, for starters. By delivering three SKUs to the market, a project of the magnitude of Crysis 2 becomes much more viable from a financial standpoint, and the resources are there to include all the features the audience demands.

"We could not have created a game with the scope, scale, and multiplayer features of Crysis 2 if it were a PC-only title," Sousa tells us, before going on to address accusations that the company sold out its core fanbase.

"The PC market just does not support that cost of development, but going multi-platform does. If making a game that is bigger, better, more stable, performs better across a wider range of hardware, provides a continued visual benchmark for PC gaming, and more fun with a huge single-player and multiplayer offering is considered selling out, that seems like a really odd application of the phrase. The decision to go multi-platform has allowed us to bring a better game to everyone, which has been our goal all along."

The process of moving across to a cross-platform workflow was an immense, time-intensive task for the developer. Tiago Sousa describes it as Crytek's "biggest challenge ever", but the directive from Cevat Yerli was clear: no lead platform, no single-format focus. Crysis 2 had to ship simultaneously on all three systems.

The first order of business for Sousa's team was to get the CryEngine code up and running on console in order to better appreciate the magnitude of the task facing them, so straightforward ports of all of the PC features were carried out.

"When all basic functionality was in place, it was clear that a massive amount of low-level optimisation and re-factoring would be required across the entire project," Sousa reveals.

"The best example (or worst depending on your perspective) from the GPU performance side: the straight port of our old post-processing was taking around 30ms, and HDR post-processing took an additional 10ms. On the current CryEngine 3 iteration for both together, it is around 5ms on consoles, which is almost 10 times faster."

Crytek's optimisation work on console led to a corresponding performance boost on PC. High setting here is roughly equivalent to the console quality. Higher-quality settings see far more computationally expensive lighting, effects plus support for NVIDIA's FXAA.

After years of working with the state-of-the-art in terms of PC processing and graphics hardware, adjusting to the relatively decrepit consoles was not an easy task for Crytek, but on the flipside of the equation the engineering team was excited by the challenge of seeing just how much they could extract from the Xbox 360 and PlayStation 3.

"GPU side, when programmed properly, they are fairly similar. We just have to be conscious of the clear handicap on PS3 RSX in terms of vertex processing, but other than that, on fragment processing side they are relatively similar, both have their strengths but such differences become irrelevant in the long run, especially when compared to PC platforms," Sousa says, assessing the overall experience of working with the two consoles.

"My finger-pointing at Microsoft/Sony would really be on the memory side. It's way too low, and the biggest crippling factor from a visual perspective. I would really like to see next-gen console platforms with a minimum of 8GB."

However, the focus on extracting as much performance as possible from the fixed architecture has seen both Sony and Microsoft develop a range of tools that allow developers to optimise their code to get the best out of the systems.

"My highest praise goes to the amazing work they did for their performance profilers, with Xbox 360 PIX and PS3's GPAD. The PC industry has a lot to learn from such tools. I think it's great to see NVIDIA's NSight trying to raise the bar once again on this area. Both platforms also benefit greatly from their vast documentation and support."

Core to the optimisation effort was the process of adjusting CryEngine to operate on a multi-core architecture. The Xbox 360 runs with six hardware threads spread across its triple-core Xenon CPU, while the PS3 only has two hardware threads on its PPU. However, it is backed by the power of its six available SPU satellite co-processors.

"If you write an engine from scratch you would establish a task pool sitting on top of five or six threads and design all parts to run as tasks. But coming from a sequentially designed engine we required an incremental approach," explains R&D technical director Michael Glück.

"We re-factored the major parts into more and more coarse grained threads. This way it runs asynchronously and can be put onto one hardware thread on Xbox 360 right away. We then re-factored the coarse grained threads into task-based processing [and] we ported those onto SPU."

Comments (134)

Comments for this article are now closed, but please feel free to continue chatting on the forum!