By Jon Jordan
Rally driving is dominated by one thing: four tires. Every spectacular corner, power slide, or windshield-cracking collision is determined by the complex interactions between those spinning pieces of tread and the unpredictability of an unmade road surface. Small wonder that even after 10 years of the multi-million-selling Colin McRae Rally  games -- or DiRT, as the games are known in North America -- U.K. developer and publisher Codemasters  still maintains a laser-like focus on simulating that pedal-to-the-metal, rubber-on-the-gravel reality.
“We received many awards for the graphics in the first DiRT game, but we knew we could push the physical interactions much, much further,” says Andrew Sage, DiRT 2’s principal programmer.
Large parts of the game’s vehicle handling have been overhauled, including major components such as the tire model, the clutch, the differential and the drivetrain. These are handled using a physics engine that runs at a minimum of 60 Hz, with critical sections of the vehicle-handling dynamics simulated at 1,000 Hz.
“These changes allow us to more accurately model the vehicle physics, and the end result is more believable and fun,” says Sage. “This is noticeably our best-ever rallying experience when played with a force-feedback steering wheel.”
The game is the first release in the McRae series to carry the former World Rally Champion Driver’s name since his tragic death in a helicopter crash in September 2007.
“Colin McRae  was all about the speed, the excitement and the entertainment of rally driving,” says Gavin Raeburn, senior executive producer of the games. “He could do things with a car that no one else would, and that’s where we’re taking the series with new events at the extreme edge of rally and autosport.”
Gentlemen, Restart Your Workflow
Renowned for its racing expertise, Codemasters made its entry into the world of multithreaded and multicore PC and console hardware by re-architecting its core game technology in 2006. Founded by brothers Richard and David Darling with the help of their father in 1985, Codemasters has a central technology team that works on underlying code that can then be branched off into individual projects.
It’s a process that works particularly well in terms of the company’s two main racing franchises, DiRT and GRID  (previously known as the ToCA or Touring Car series). Each has its own focus. GRID is a track-based game in which you’re racing against up to 20 other vehicles in large, open urban environments. DiRT concentrates on the fidelity of single-vehicle dynamics, although the game now contains some multivehicle stages too. This means each development team can tweak the shared EGO engine for its own ends, while the central operation ensures that improvements in general features -- such as handling, rendering, and special effects -- raise the standard for all.
“In DiRT 2, we’ve tried to improve the way the car and the surrounding objects interact in the environment, especially in terms of how the physics works in specific areas,” says Sage. “Even seemingly minor features, such as modeling the way a car handles when you drive fast through water and the extra drag this creates, are a big improvement.”
Achieving Realism at Every Level
With physics comprising a major component of DiRT 2, it’s no surprise that the development team has had to pay close attention to ensuring the most efficient use of system CPU.
“The lead platforms for DiRT 2 are PlayStation 3 and Xbox 360, but their architecture is fairly similar compared to the PC,” explains Gareth Thomas, senior graphics programmer. “We actually treat them as medium-spec PCs. We split resources by handling the rendering on one core and running the game logic and physics on another core.”
The processes are parallelized, depending on how many cores and threads are available in the host hardware, using a system Thomas labels “worker maps.” These describe how many threads the different subsystems split into and which cores the different processes should use.
“The original DiRT was our first effort at a multithreaded platform, and we found a lot of work ended up on one core, causing a bottleneck,” says Thomas. “The worker maps allow us to tune the various systems in games that take advantage of multiple cores.”
In this way, the team ensures that DiRT 2 will scale from lower-end to higher-end machines. But only the smallest amount of hard work the Codemasters team puts into DiRT 2 will ever be overtly exposed to players.
A game that makes the best use of the available hardware -- as players clip a rocky outcrop at high speed, triggering a complex interplay between the physics and the rendering system, throwing their ride into the air and then rolling over into a ditch, with expensive-looking components flying all around -- will be the only result they care about. And rightly so. This is rally.
Jon Jordan started writing about game technology and the development process at the U.K. magazine Edge. Since then, his work has appeared in PlayStation: The Official Magazine, 3D World and the Financial Times, as well as on sites such as Gamasutra.com and PocketGamer.co.uk.