Threaded Game Engine Helps Create New World In EA BioWare's Dragon Age*: Origins
EA BioWare's Dragon Age: Origins Creates a New World with the Help of a Threaded Game Engine

Then the company goes more or less mum on the subject for the next five years.
Fast forward to late 2009. After half-a-decade of work, the launch of Dragon Age: Origins is imminent. The North American release for Microsoft Windows* is slated for November 3, to be followed three days later in Europe. And the buzz about the game is building.

The New York Times’ Seth Schiesel hailed Dragon Age: Origins as one of the 10 video games you can count on for this holiday season. BioWare, “masters of the role-playing genre, are going back to their roots with this dark and sometimes sexy . . . epic,” declared the Toronto Sun’s Steve Tilley, who named it one of eight must-have games for 2009.
One reason for the five-year development process was the company’s own must-have technical criteria for the game—that it take maximum advantage of multi-core chip architectures. Though technologies such as Intel® Hyper-Threading Technology had been around since 2002, when Dragon Age: Origins was announced in 2004 it was still mostly a single-core world. By the end of that year, profound change was in the air. In a December 20 article, Associated Press technology writer Matthew Fordahl explained the momentous shift this way:
“For decades, computer performance has been driven largely by the increasing numbers of ever-smaller transistors squeezed into the machines’ silicon brains. With each generation, speeds jumped and prices dropped. Though the tiny switches built in silicon are the heart of the digital revolution, they can’t shrink forever. And in recent years, chip companies have struggled to keep a lid on power and heat—the result of some transistor components getting as thin as a few atoms across. Now, the world’s leading semiconductor companies have unveiled a remarkably similar strategy for working around the problem: In 2005, microprocessors sold for personal computers will sprout what amounts to two heads each. Instead of building processors with a single core to handle calculations, designers will place two or more computing engines on a single chip. They won’t run as fast as single-engine models, but they won’t require as much power, either, and will be able to handle more work at once.”
By the middle of 2005, Intel was shipping multi-core for desktops, laptops, and servers. And the cognoscenti at BioWare began to realize their game would be released onto a very different platform than most PC gamers had used up until then.

Moving to Embrace Potential Of Multi-Core
“Multi-core, multi-threaded development, along with the emergence of HD graphics, was the foundation of the huge technology transition that happened within Dragon Age: Origins development,” said Mark Darrah, BioWare’s executive producer of the Dragon Age franchise. “It actually sent the team back to the drawing board at least once, asking themselves, ‘What’s the right way to take advantage of this shift?’ The team was clear that they weren’t going to build a multi-threaded platform just for the sake of it. They wanted real, tangible gameplay benefits for our players. So, the programming staff actually worked with our designers to explain the technology and then to collaborate on a plan of how best to use it. The result is several aspects of the gameplay that are enhanced on multi-core systems.”

Here’s another all-too-familiar result of coding for multi-core chips: headaches. That’s because embracing parallelism is flat out difficult. Often a development team applies a Herculean effort to, for instance, adding gobs of synchronization primitives to prevent multiple threads from accessing data at the same time. Then, without fail, many of those threads spend inordinate amounts of time idle and waiting for other threads to execute. A meager payoff for a huge amount of trouble is unfortunately not uncommon.
Given the inexorable push toward more multiprocessor, multi-core computers (in February 2007, Intel demonstrated an 80-core processor produced as a research project at the International Solid State Circuits Conference in San Francisco), game developers may eventually need to toss out their age-old reliance on object-oriented programming (OOP) and begin focusing from day one on data-oriented design. This means grokking the various types of data; how and where they are stored in memory; and how input data are read, processed, and turned into output data at interactive rates during gameplay.
“Step back for a minute and think of the last game you worked on,” wrote Noel Llopis in the September 2009 issue of Game Developer magazine. “How many places in the code did you have only one of something? One enemy? One vehicle? One path finding node? One bullet? One particle? Never! Where there’s one, there are many. OOP ignores that and deals with each object in isolation. Instead, we can make things easy for us and for the hardware and organize our data to deal with the common case of having many items of the same type.”
Of course, exhortations such as Llopis’ run smack into the realities of deadlines, constrained budgets, and the difficulty of simultaneously retraining while working on a looming release. BioWare’s approach to multi-core can be summed up with three bits of advice: iterate toward success with the entire team of developers and artists, lean on Intel, both for its development tools and its engineering expertise, and always strive for simplicity.
Darrah is adamant that one of BioWare’s most important decisions was to insist that the designers and artists work to understand some of the pitfalls and challenges of multi-core development, and not just in a cursory way. This sort of mutual understanding helped everyone pull toward the same set of realistic goals to benefit gamers, such as providing more creatures on the screen or achieving smoother load transitions.
Multi-core, multi-threaded development, along with the emergence of HD graphics, was the foundation of the huge technology transition that happened within Dragon Age: Origins development. —Mark Darrah, BioWare’s Executive Producer of the Dragon Age franchise
“Designers had to learn too,” said Darrah. “With a game design as broad and deep as Dragon Age: Origins, it’s easy to fall into the traps associated with multi-core development.”
When it comes to encouraging its designers and programmers to collaborate, BioWare does much more to insist that everyone speak the same language about new chip architectures. Four years ago, the company implemented Scrum methodology, an iterative incremental framework for managing complex work that is commonly used with agile software development. The hallmark of Scrum is a development cycle of short two- to four-week sprints during which a cross-functional team works to finish a particular product increment.
“We assign our Scrum teams by system or functional area,” said Aaryn Flynn, senior director of development operations at BioWare, responsible for overall staffing of the projects in development at the company. “We might have a team or two working on storytelling aspects, a team working on creatures, one working on the combat system, and another working on the GUIs. Overall we try to keep the teams as cross-functional as possible, just to keep the collaboration going.”

Dragon Age: Origins will be BioWare’s first product of Scrum development, which is also being used in its work on Mass Effect* 2, a title developed alongside Dragon Age: Origins at BioWare’s Edmonton studio, with support from BioWare’s new team in Montreal. For all the advantages of agile methodology, Flynn is quick to point out that BioWare’s chimeric teams benefited from more than just a faster, smarter approach. They also received various kinds of support from Intel.
At the top of the list was Intel® Thread Checker, an analysis tool that pinpoints hard-to-find threading errors, such as data races and deadlocks in 32-bit and 64-bit applications. Flynn said that throughout much of the development cycle, two BioWare programmers would daily “fire up Thread Checker and look at stuff.” Intel® VTune™ Performance Analyzer was also used regularly for overall optimization.
“I think it’s really important that along the way you use tools that are available to make sure that what you’re attempting to do is actually being done, that you’re actually getting the advantages that you thought you would from multi-core development,” added Darrah.
Intel also provided BioWare with development hardware, made several visits to the Edmonton studio, and otherwise made its engineers available for technical discussions with BioWare programmers.
Building the Dragon Age Lore
“’Run, Maric!’ And run he did. His mother’s dying words whipped him into action. The image of her grisly murder still burning in his mind, Maric reeled and plunged into the trees at the edge of the clearing. Ignoring the clawing branches that scraped at his face and clung to his cloak, he blindly forced his way into the foliage.”
So begins the novel Dragon Age: The Stolen Throne, released in March 2009. The book, written by the game’s lead writer, David Gaider, is part of BioWare’s effort to create the lore and characters that it hopes will capture the imagination of RPG players when Dragon Age: Origins is released in November, 2009. The Stolen Throne is set 30 years before the events of the game and tells the back-story of several important characters. Here’s the product description from Amazon.com:
“After his mother, the beloved Rebel Queen, is betrayed and murdered by her own faithless lords, young Maric becomes the leader of a rebel army attempting to free his nation from the control of a foreign tyrant. His countrymen live in fear; his commanders consider him untested; and his only allies are Loghain, a brash young outlaw who saved his life, and Rowan, the beautiful warrior maiden promised to him since birth. Surrounded by spies and traitors, Maric must find a way to not only survive but achieve his ultimate destiny: Ferelden’s freedom and the return of his line to the stolen throne.”
Perhaps more interesting than the synopsis, at least for those wondering about BioWare’s ability to create a compelling story and setting for the game, is the steady trickle of positive Amazon.com reviews for the book.
“I was reading it more to ‘get in the mood’ for the game than anything, and I had very low expectations, to be honest,” wrote Peter A. Smith in a four-star March 21 review. “And I was blown away.”
“Books associated with games usually are not great literature,” added Sarah Jacobsen 11 days later, who went on to compare Gaider with such Science Fiction/ Fantasy lions as Terry Goodkind and Robert Jordan. “This book is truly an exception.”
The release date for the second book in the series, Dragon Age: The Calling, has yet to be confirmed.

Revving Up a New Game Engine
The most prominent multi-core payoff of this collaboration is the heart of the game, the Eclipse Engine*. (For now the company is sticking with the name, despite the existence of the Eclipse open source community and its eponymous development platform.) Dragon Age: Origins’ multi-threaded engine uses a job dispatching scheme that takes core engine tasks, such as AI actions, physics calls, and so on, and deploys them to the available thread.
The engine was designed intentionally to be generic and easy to use so that BioWare programmers could iterate over the development cycle to move more and more of the engine functionality to dispatched jobs.
For now, the engine will be the foundation for extensive post-release content plans for Dragon Age: Origins and will act as a platform for the hoped-for avalanche of user-generated content that will flow from the planned Dragon Age Toolset. Eventually, Flynn and Darrah say, the engine may be used not only for future Dragon Age titles, but also by other Electronic Arts studios.
All the work on parallelization appears to have paid off. According to an Intel analysis, Dragon Age: Origins showed a 20 percent performance jump on Intel’s next-generation Kings Creek desktop platform supporting four cores and eight threads.

“Not bad considering we did all the work before that hardware was even available!” said Darrah, who added that BioWare reaped real benefits from profiling done by Intel of several earlier builds of the Eclipse Engine.
Of course, creating a game means more than writing lines of code. Intel’s Steve Pitzel likes to point out that in fact the majority of staff at most game studios don’t write code at all, and instead focus on storytelling, from writing narrative to illustrating characters and scenes. And in the case of Dragon Age: Origins, the storytelling challenge was paramount. That’s because unlike BioWare’s success with titles such as Star Wars*: Knights of the Old Republic* and Sonic Chronicles*: The Dark Brotherhood*, Dragon Age: Origins is set in a brand new world of the company’s own creation.
“When you’re working with licensed intellectual property (IP) you actually have an established set of lore and story and understanding of the universe,” said Darrah. “When you’re building your own IP, you have to build all that lore, all that back story yourself in order to create a compelling vision, and then you have to use that to fill in the world that you tell the story within. So you have to build a world as well as build a game.”

Forget the Dark Winter Weather; BioWare’s Future is Bright
BioWare seems well positioned to build on its recent success. For starters, the company is now backed by the global marketing reach of EA, the world’s leading independent publisher of video games. Next, with a growing library of titles, including the enthusiastically received Star Wars: Knights of the Old Republic, BioWare has a won a sizable cadre of rabid fans. However, it’s a third point that may figure most prominently in the company’s future.
We hear repeatedly that the twenty-first century will be defined by globe-trotting knowledge workers. Given that talented software developers can live in many places in the world where the month of January is marked by conditions more hospitable than Edmonton’s just under eight hours of average daily sunlight and average daily temperatures of -9 degrees Celsius, it’s noteworthy that BioWare is winning rave reviews as an employer. The company was named a Top 100 employer in Canada, and is situated in arguably Canada’s most business friendly province— Alberta. And already, said Flynn, more than a quarter of BioWare’s staff is from somewhere besides Canada or the United States.
“We have people who joined us from the U.K., from Australia, from Europe, from Mexico,” said Flynn. “It starts off with one person joining us and then they recommend a friend, and that friend is a good person so we hire him or her, and then on and on. We’re very proud of the fact we’re a very cosmopolitan, very multi-cultural studio right here in Edmonton.”
ABOUT THE AUTHOR
Geoff Koch is a contributing writer for the magazine. He last wrote about composer Justin Lassen’s Synaesthesia project in Intel ® Visual Adrenaline magazine, Issue No. 5.
--------------------------------------------------------
Sign up today for Intel® Visual Adrenaline magazine: http://va.softwaredispatch.intel.com/ »
























Multi-core, multi-threaded development, along with the emergence of HD graphics, was the foundation of the huge technology transition that happened within Dragon Age: Origins development. —Mark Darrah, BioWare’s Executive Producer of the Dragon Age franchise




