If you peer out over the painstakingly rendered Venetian skyline in Assassin's Creed II, or watch a car being convincingly torn to pieces during a high speed crash in Forza Motorsport 3 one thing is abundantly clear. Videogames are beautiful now.

It's not the figurative beauty of yore – the iconic charm of Pac-Man, the elegiac simplicity of the vector-mapped space craft in Elite. Modern games are edging toward photo-realism; indeed, through technologies like mimetic interfaces and augmented reality, they are encroaching on reality itself. And at times they are breathtakingly close.

But here is the minor tragedy at the heart of modern games: no matter how astonishing they look, players will never see one of the most beautiful components: the 3D engine.



This vast chunk of programming code powers everything we see on screen, it renders the universe, calculates the trajectory of every object and ensures the player moves smoothly through it all. These are the major engineering projects of our age – the digital era's Forth Bridges and Eiffel Towers. The Unreal Engine, created by Epic Games, has been in production since 1994 and contains a breathtaking 2.5 million lines of code; as Epic co-founder, technical director and engine coding guru Tim Sweeney, points out, "That's roughly comparable to the complexity of a whole operating system a decade ago."

Nowadays, developers spend several years developing one engine which then powers all of their games. These technologies are so important; they have become brands in their own right. They're given exciting macho names like EGO, RAGE and OGRE and whenever a new title is announced, the 3D engine will be there listed among the key selling points.

Building them is a major team discipline. UK publisher Codemasters is fairly typical with its team of 30 technicians working full-time on maintaining the company's EGO engine, which is used in everything from racing titles to shooters. Down the road at Blitz Game Studios, they've put ten years into the creation of the BlitzTech engine: "That's well over a 100 years of man hours to date," says technical director, Rich Hackett. "And it has cost literally millions of pounds…"

This sheer investment of time and manpower doesn't apply exclusively to the big commercial projects. The community-built 3D engine OGRE has been in constant development and iteration since founder Steve Streeting began work on it in 2001 – he reckons over 200 people have contributed in some way to the engine over its lifetime.

One of the most intriguing elements of the process is the range of skills and experiences that go into engine production. It's not just C++ coders, straight out of computer science degree courses – it's physicists, mathematicians, architects…. one of the staff at Realtime Worlds, for example, wrote the software powering the New York stock exchange, Joe Graf at Epic Games helped design the bill paying system used by most online banks, and in the mid-nineties, Moscow-based flight-sim specialist Eagle Dynamics employed several ex-military programmers who once created the guidance systems for Russia's nuclear missiles.

Sweeney is also keen to point out, however, that the diversity necessary to produce a cutting edge 3D technology goes beyond high-end academic backgrounds. There are plenty of ex-hobbyist programmers at Epic, the guys who learned their stuff coding and hacking hardware at home. And that's not the end of it, "Mike Buck formerly toured with a heavy metal band," says Sweeney. "I used to mow lawns and Cliff Bleszinski once worked at McDonalds…"

How these diverse disciplines mesh together on a single technology is one of the major organisational headaches in game production. Here's the thing – everyone codes differently. It's easy to overlook this if you're not a programmer, but there are many different ways to achieve the same ends with a piece of programming code; in some ways it's like getting 30 authors together to write the same story. "People always have a different style and also a different design philosophy," confirms Bryan Marshall, chief technical officer at Codemasters. "We try to encourage common standards throughout the codebase, but we have so many people working on these things it's never quite the same. The computer scientists tend to be more like code engineers – they are a bit more precise, whereas the mathematicians and physicists will be more interested in the algorithm itself and a bit less concerned about the actual code layout and design. But as they get more experienced they tend to iron out all those bad habits…"

"This is something that can generate some pretty strong feelings - and discussions," adds Hackett. "Coding standards are a way of trying to deal with the inconsistencies and make it easier to work with larger teams on big codebases by agreeing on a broad set of sensible compromises. Getting 100% agreement is next to impossible though. In years gone by this was less important and it was easy to tell who had written different code. One notable example was one of our most senior programmers who became known for what was dubbed 'Scottish indenting', which refers to the unique way he laid out his code on the page…."

There is a constant friction between attempting to flatten idiosyncrasies in order to attain efficiency and clarity, and recognizing that individual flourishes are a vibrant element of the design process. It can never be resolved, because really, it's part of the process. It is creativity, after all. "There's definitely an art to programming," agrees Sweeney. "You can learn a lot about a programmer by reading a little bit of code. A funny illustration is the 'Epic programming test', which we use when considering job applicants. One of its questions calls for writing a program to convert a number into a text representation of its digits. This seems simple, but I've seen solutions ranging from five lines of code to 50 lines of code; some produce perfect results and some suffer numerous bugs. Some of the code is beautiful, some is ugly; it ranges from mathematical in style to procedural and sometimes even schizophrenic!"

3D engines then, are architectural marvels, created by some of the finest minds of our generation. Or at least that's how it seems to me, an ardent gamer. I was interested though, to find out from the creators of these technologies, how engines rank in terms of other envelope-pushing technical endeavours. Are games at the forefront of physics and computer science research or forever lagging behind academia?

Sweeney reckons it's a bit of both: "Game development is at the cutting edge in many disciplines. The physics in modern games includes rigid body dynamics and fluid simulation algorithms that are often more advanced than the approaches described in research papers. Over the past 15 years, games have caught up with 40 years' of graphics research and are now leading the charge in some domains, such as practical lighting and shadowing techniques.

"In other areas, we're still stuck in the Stone Age due to ingrained technologies. The C++ programming language, used in all modern games, was hastily conceived in the 1980s as an extension to the 1970s C programming language. Many of the problems that plague computers today - security vulnerabilities, viruses, and so on, can be traced to problems in this language."

Marshall meanwhile, recognises that games need to be somewhat economical – and playful - when it comes to employing advanced areas of maths and physics. "In the academic areas everything is more precise, it's more accurate – a lot more work goes into the fidelity of the simulation. At Codemasters we tend base all of our physics on good fundamental principles, then we simulate within the limitations of the consoles in mind. Sometimes, too, we need what's best described as 'Hollywood physics'. When a crate falls from a height, if you accurately simulate that, you can look at the screen and think, 'well, that doesn't look right'. But then you start tweaking the numbers and changing gravity, making things accelerate faster – it's almost like this Hollywood expectation of motion simulation - and that actually looks correct. You have to remember games are an entertainment after all…"

"It's a feedback loop actually," argues Streeting. "a lot of visualisation researchers now use engines like OGRE to test out their ideas, and then sometimes we might implement some of those ideas in OGRE at a later date. Because you're always pushing up against the limitations of modern hardware, I would say engine implementations follow research as the technology becomes available, more than directly pushing research forward, although certainly some of the implementations are academically interesting in their own right simply by coping with those limitations in a clever way."

Importantly, these technological marvels are creeping out of the world of gaming into other sectors. TruSim, the 'serious games' division of Blitz Games Studios has used the company's engine to create Triage Trainer, a prototype simulation that helps medical first responders to correctly prioritise victims at an accident scene. "Studies have shown that responders who have used this training tool perform significantly better in further training tests than those who have not," says Hackett. "TruSim is also working with medical teams to simulate patient reactions to serious organ failure again using computer generated human characters to show cause and effect in a way that is not possible through conventional training."

Elsewhere, game engines are being used by young architecture and urban planning firms to visualise new projects. "Realtime is the key," says Dr Andrew Hudson-Smith from UCL's Centre for Advanced Spatial Analysis. "Before the rise of the game engine visualizations had to be pre-rendered which is slow - perhaps as long as a week for a two minute clip. Now it is possible to do 'what if' type scenarios and run lighting simulations to determine the impact on available sunlight, shadow analysis, wind flow, etc."

Apparently the latest iteration of the Crytek engine, has become a favourite. "Crysis comes with a 'sandbox' mode which allows anyone to strip out the main game and insert their own models," explains Hudson-Smith. "So any model from the Google 3D Warehouse, for example, can be imported. As a research tool it has changed things massively, high-end VR setups are no longer necessary, we can do better visualization with software costing £49."

The problem is, actually licensing a commercial game engine for a major design project (rather than just roughly visualising a concept in its early stages) is expensive, and with the economy in the state that it is, it's seen by a majority of firms as an unnecessary luxury. As Jeff Mottle, editor-in-chief of CGarchitect.com explains, "By far the most widely publicized usage of a true game engine was done by HKS for the design and visualisation of the Dallas Cowboys' stadium. I believe they used the Unreal Engine. HKS had that expertise on staff in their visualization department and the budget. Last I heard, though, most of those people were let go earlier this year with the massive redundancies that happened across our industry when the economy fell out."

However, there are alternatives to the major console engines out there, and they're getting more powerful all the time. One example is Unity3D, developed by San Francisco company Unity Technologies and aimed mostly at small studios working on casual PC, handheld and iPhone game titles. The tool is free for non-commercial use (and considerably cheaper than major console engines for professional users.) Hudson-Smith reckons it could prove to be a useful architectural tool: "It is extremely impressive with a built in physics engine, and again it allows quick and easy visualisation for either design teams or to communicate ideas to the public at large."

Game technology can also be mashed up with other packages to help with urban design – and may even prove useful to those who want to protest at developments in their area. "The rise of technology is allowing the people on the street to design and share things themselves," says Hudson-Smith. "Google SketchUp is a prime example. It is a free 3D modeling tool that can be 'plugged into' many game engines. This makes it a democratising tool, if people don't like what the council is doing in terms of urban design or street furniture they can re-design it themselves and put it online to raise awareness of the issues. SketchUp is the most used 3D modeling tool by the public and many activist groups turn to it to illustrate their designs. Combine this with Google Earth and the reign of the 'urban planner' knowing what's best is now being questioned..."

Meanwhile, Streeting sees OGRE as a multifaceted tool rather than just a games engine. "it's designed for any real-time 3D use and our community reflects that," he says. "We've obviously had game developers, researchers in fields from the fairly obvious (molecular visualisation, medical imaging) to the rather obscure (virtual spiders learning to walk), automotive designers, defense contractors, processor & GPU vendors…" So where else will we find OGRE? "Submarine ROV operators for oil pipelines, interactive kiosks, Windows desktop / browser replacements (BumpTop/Flaii), virtual museum exhibits (Ogre has been used in museums all over the world in various projects, including at least at the Science Museum in London), sports TV coverage, golf training centres, interactive public art projects - pretty much you name it, it's turned up at some point!"

With the rapid evolution of game technology in mind - there's an obvious final question for our panel of 3D engine luminaries: where are games engines going next? What are the key new areas development? Marshall thinks that the incremental steps toward photo-realism will continue: "certainly for graphics it's all about mathematically correct, realistic radiosity lighting, where the banks of light from one surface on to another is correctly simulated and also the actual surface qualities of the material is simulated as well. That's one area we're seeing more advances in."

Streeting, however sees some major changes in terms of our interactions with 3D worlds. He reckons new handheld technologies like the iPhone 3GS will bring high-end 3D visualization out of the age of the home console and into the street. The future is PS3 visuals wherever you are, and with new interface technologies such as motion controls, 3D technology will become truly pervasive.

"Augmented reality is one of a number of very interesting areas which is still mostly in the lab or in fairly limited use so far," Streeting continues. "Bringing virtual 3D content and overlaying it on the real world in useful ways is a big growth area I think. Imagine a civil engineer being able to point their phone camera at a street and overlaying that with information of existing water pipes/electricity cables or visualising the changes that they're due to make, and update in real time as they move it around. People are working on that sort of application already but I'm sure as devices become more powerful it will be a lot more common. There are huge numbers of applications for this kind of technology."

For us, it's all about the games. I've seen plenty of augmented-reality titles – the likes of Mosquitoes, the old favourite for Symbian camera phones, which has just been updated for the iPhone. But the overlay of Unreal Engine-style 3D performance on the real world? Will this be the game engine's defining moment? Will this be the point at which mass consumers appreciate the beauty of this hidden art form? Time and technology, as ever, will tell.