Despite intense competition in the genre in recent years, Codemasters has managed to more than hold its own with its impressive roster of racer titles. Its most recent releases, Race Driver: GRiD and Colin McRae: DiRT 2, have both been very well-received, and have been state of the art not just in terms of gameplay but in their core technology too.
Last week, DiRT 2, powered by the latest iteration of Codemasters' proprietary EGO engine, debuted on PC. The developer has been working closely with key partners including Microsoft, Intel and AMD in creating the first top-tier PC release to support the new Windows 7 DirectX 11 API, and the result is the finest version of the game yet. The return of DiRT seemed like as good an excuse as any to talk tech with Codemasters: to discuss the evolution of the excellent EGO engine, the performance on HD consoles and what we can expect from them in future, along with the developers' plans to leverage the power of the many-core processing architecture we expect to see in next-gen systems.
Talking to Digital Foundry is Codemasters' chief technical officer, Bryan Marshall.
Digital Foundry: First up, can we have a bit of history on the EGO tech? The accepted wisdom is that the code is derived from the PhyreEngine, which in itself has evolved significantly over time. How much does EGO still have in common with Phyre, if anything?
Bryan Marshall: At the end of the last generation, Codemasters took a big strategic decision to start coding from fresh for the multi-core (then) next-gen platforms. That meant dumping a lot of mature code we had built up on PS2, Xbox and PC: we knew we had to do something radical for this gen and not be encumbered by the legacy of the past architectures.
We also knew at that stage that the radical new architecture of the PS3 and CELL was going to be tough to develop for and had heard that Sony were developing some of their own libraries called at that time PlayStation Scene Graph (PSSG). It made a load of sense to work closely with those guys in London and really get the most out of the PS3 with their inherent Sony knowledge. We mainly used it for the rendering side, but PSSG, or PhyreEngine as it's now known, has many more features than that.
We diverged at least two games ago and haven't used anything of the PhyreEngine versions but I still believe it offers a great deal for developers looking to get into PS3 development. The Sony guys are also very smart and I definitely recommend working with them. However, things have come on a long way for us and we're now working on a big upgrade and finally losing the last pieces of PSSG.
Digital Foundry: What was your initial assessment of the Xbox 360 hardware when you first started to work with it in terms of its strengths and weaknesses? How did this shape your vision for the first DiRT?
Bryan Marshall: I think we were so used to working within the limitations of PlayStation2 and Xbox hardware that it caused great excitement when arriving. The available memory and performance was a great leap and we probably spent some months reining in everyone's ambitions!
What I would say is when all the components of DiRT started to come together, I think it blew us all away. However, we did some really early tech demos of things like large numbers of people in crowd (20k I think) and you didn't start to see those until GRID. In DiRT 2 I think we are up to something like 100,000 people. Techniques such as ambient occlusion and normal mapping suddenly became the norm.
Digital Foundry: There was a tangible performance boost when DiRT eventually hit PS3, when many conversions of the era were considerably inferior to the 360 counterparts. What was your strategy in approaching the Sony hardware?
Bryan Marshall: I think working Sony closely helped for starters, but also our strength as a company has always been to really understand the hardware and get the most of out of it. We have developed for consoles for a long time and have a superb set of people who really understand how to optimise for these platforms. It's in our DNA. We tried to get to grips with the SPUs on DiRT, but on following games, and certainly DiRT 2 this got pushed an awful lot further.
We are also very aggressive on our cross-platform approach, to the point where even the multi-threading synchronisation primitives are cross-platform. By going so low on the cross-platform side, we get high performance on all platforms, playing to their strengths and avoiding as much as possible from any lowest-common-denominator issues.
Digital Foundry: EGO's debut with GRID saw what you might call a pretty enormous boost to frame-rate consistency, image quality, post-processing effects, physics... everything. Was it truly an evolution of your previous tech in terms of additions and optimisations, or was it effectively a new engine?
Bryan Marshall: Quite simply some modules were re-written from scratch, others just updated. You can't afford to stay still in this industry and we never want to get complacent.
Digital Foundry: What is your approach to the many-core architecture of the HD consoles? Criterion Games, for example, writes the same code for each platform with "manager code" distributing the tasks across whatever processors are available...
Bryan Marshall: We have a data driven threading model using what we call 'worker maps'. It allows us to write a simple XML file describing how our threads should mapped across various architectures, including PS3, 360 and multi-core PC.
We've worked closely with Intel on both PC versions of DiRT 2 and Operation Flashpoint: Dragon Rising to really drive this system further. We see performance scaling improvements of up to 1.7 times moving from two-core machines to four-core (hyperthreaded machines). The worker map system also allows us to prepare a threading set-up for unreleased larger core platforms. Working with Intel prepares us for the many-core future and we have to be aware of that now.