Complex Worlds, Mainstream Graphics

Red River moves the near-future storyline of the infantry shooter from the tundra-covered island of Skira to the sandy deserts of Tajikistan. It retains the key hallmark of an Operation Flashpoint game: vast, seamless playing areas many kilometers wide in which players can choose their own tactics. It also has the same realistic squad-based combat — with AI teammates or four players in co-op — and an unnerving attention to detail and authenticity.

“The goal was to make it more accessible to a wider audience,” says Steve Bennett, Red River’s lead programmer. “We wanted a mainstream game rather than a hard-core military simulator. From a technology point of view, we wanted to make everything more efficient, with higher detail and better visual quality right out of the box.”

Increasing Complexity

The rendering team’s challenge at the start was to match previous Operation Flashpoint games in terms of scale, but to live up to modern gamers’ expectations for detail. To make things more difficult, the designers decided that in addition to the wide-open spaces for which Flashpoint is acclaimed, they wanted to improve the density of built-up areas to create more intense battle scenes in tighter spaces.

“The environments in Operation Flashpoint: Red River are more detailed and complex than the last game,” explains Bennett. “Much of the gameplay is based in small villages with narrow paths around a very complex environment with a lot of objects. This expands the range of combat — from very long range over open terrain, to close up with people coming out of doors and shooting out of windows.”

Stuart Merry, a senior programmer on the Operation Flashpoint graphics team, reckons that as a result of the effort, in some cases there are three times the number of objects on screen at any one time as there were in Operation Flashpoint: Dragon Rising. Although this game is set in a hot, arid environment, most people don’t realize how difficult it is to make a desert look convincing.

“The technical challenge we faced was changing the location and increasing the detail,” says Merry. “The artists wanted shaders and detailing on the objects themselves, so in addition to having many more objects, we had a lot more detail on each object. So we’ve had to implement things like occlusion culling, which allows us to have very dense areas as long as one part of that area isn’t too busy in itself.”

Dave Smethurst, principal programmer on Operation Flashpoint: Red River, says that rendering only what the player can see reduced the overall workload, saving about 30 to 40 percent of the objects in the scene.

“A building may be broken down into five or six draw calls because of the number of materials in them,” he says. “By doing one draw call for the occlusion culling, we can remove, say, six draw calls later on in the pass. Occlusion culling allows us to achieve better frame rates on our minimum hardware target and to render the high detail worlds the artists are authoring it in,” says Smethurst. “Anyone with a minimum spec piece of hardware will notice changes that will bring the game to life.”

Spinning off Physics

Being able to render a more complex world on entry-level graphics introduces new problems, though. Every extra rock, for example, presents a greater path-finding challenge for the AI.

“As the graphical density has increased, so have other elements of the game, such as physics and AI,” explains Merry. “We’ve moved those off to other cores as necessary to achieve our target frame rates, because that’s obviously a huge hit when you double the amount of objects that you can collide with or that the AI has to avoid.”

At the same time, designers were keen to add more non-playable character soldiers into battles. To achieve this, the programming team has reworked the way the engine handles multithreaded routines, introducing dynamic thread distribution that can scale from two to 12 or more cores.

“Learning the lessons from the previous game, we’ve had a look at how we can load balance some of our jobs even better,” says Smethurst. “We’re increasing the number of threads that are running, for instance, and the AI has been threaded out of the main gameplay thread.”

A key target for Operation Flashpoint: Red River has been getting the game running acceptably on entry-level hardware. Obviously some visual compromises will be necessary, but the quality of integrated GPUs now is such that Codemasters believes it is possible to match the graphical performance of, say, a Microsoft Xbox 360 on a midrange laptop. “That’s a scenario that’s only going to get better”, says Bennett.