GAME JOBS
Contents
Postmortem: Overhaul Games' Baldur's Gate: Enhanced Edition
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
June 6, 2013
 
LeapFrog
Associate Producer
 
Off Base Productions
Senior Front End Software Engineer
 
EA - Austin
Producer
 
Zindagi Games
Senior/Lead Online Multiplayer
 
Off Base Productions
Web Application Developer
 
Gameloft
Java Developers
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
June 6, 2013
 
Tenets of Videodreams, Part 3: Musicality
 
Post Mortem: Minecraft Oakland
 
Free to Play: A Call for Games Lacking Challenge [1]
 
Cracking the Touchscreen Code [3]
 
10 Business Law and Tax Law Steps to Improve the Chance of Crowdfunding Success
spacer
About
spacer Editor-In-Chief:
Kris Graft
Blog Director:
Christian Nutt
Senior Contributing Editor:
Brandon Sheffield
News Editors:
Mike Rose, Kris Ligman
Editors-At-Large:
Leigh Alexander, Chris Morris
Advertising:
Jennifer Sulik
Recruitment:
Gina Gross
Education:
Gillian Crowley
 
Contact Gamasutra
 
Report a Problem
 
Submit News
 
Comment Guidelines
 
Blogging Guidelines
Sponsor
Features
  Postmortem: Overhaul Games' Baldur's Gate: Enhanced Edition
by Trent Oster [Postmortem, Programming, Production, Console/PC, Indie, Smartphone/Tablet]
6 comments Share on Twitter Share on Facebook RSS
 
 
April 15, 2013 Article Start Previous Page 4 of 5 Next
 

What Went Wrong



1. Epic Code Complexity

We began work on the project almost two years from ship. At the start we planned to "ninja in, make some minor changes, replace the graphics system and ninja out." As we began to work with the code base, we found severe performance and stability issues with the engine. We traced some issues back to the core threading model of the Infinity engine.

Infinity was multi-threaded before there were processors capable of parallel code execution. As such, it was designed around a concept of threading that never really emerged. The main issue was that all of the threads shared the same set of data. The problem is all these threads were created and they all hit the same memory and as such, blocked each other, stalling all threads until the current one completed.

The code was also heavily laced with critical sections, which caused (in some cases) 70 percent of execution time spent in no-ops. Our long-term solution was to machete in and remove the threading, removing a couple hundred thousand lines of code from the game. The end result was more stable and had fewer performance irregularities. The "ninja-in" approach was tried in other areas, as well, and every time the end result was consistent. We always found a ton of complexity solving an era-specific problem that no longer applied. We continue to find roadblocks in the code and we're improving it as we go.

2. Intricate Code-Data Dependency

I have a development joke I often drop: "When a programmer believes he/she is being clever is when they create the greatest atrocities." The Infinity Engine is chock full of clever. For example: to render a character to the screen, the correct frame and orientation of a character sprite is first loaded out of a resource file using a very heavy resource-management system. The sprite is then color-mapped using a 256-color palette swap to enable player colors. Following the re-mapping, any number of further palette-manipulation code (stoneskin, anyone?) can step in and further change the actual data. Then the sprite is rendered against whatever potentially covering elements are nearby.

The final result is sent to the screen in 64x64 pixel tiles to be rendered. The entire system runs under a dynamic update system that flags 64x64 tiles as updated and renders them or, with no change, leaves the tile from the previous buffer. The volume of clever shifts and tweaks along the way make it nearly impossible to track down all the ways in which a simple sprite can be manipulated. In some cases, the data can reference many different .2da data files on how it can be manipulated, from equipment-changing animation frames to a data redirection to render a dwarf sprite instead of the default human. Complexity is par for the course in an RPG of this magnitude, but the intricate linking of assets and code really limited our ability to make the architectural improvements we wanted to make.

3. The Lost Source Art

We had drafted the original deal in the context of a Baldur's Gate: HD. Our plan was simple: grab the original artwork, clean it up, re-render it at higher resolutions and with better materials, thus creating stunning versions of the areas everyone remembers. We planned to take the character models and re-render them with many more frames of animation and add new orientations to the movement to make the game smoother. We nailed down the core terms, got everyone on the same page and we got our first drop of the assets from BioWare.

A few days later we noticed a large hole where the source art should be -- stuff like 3DS Max files and texture images. "No problem," I said; I contacted Derek French over at BioWare and he dug further and sent us more data. We again dug through and failed to find the source art. I made arrangements to visit BioWare with a removable drive and work with Derek and the IS department to find the assets.

After two days of searching we came to the horrible realization that the source artwork was stored on a departmental drive and not a project drive, and as such was not frequently backed up. We dug through tape backups to no avail. The source art was lost.

At this point we brought the information back to Atari and the deal was dead in the water. Cameron and I spent a few weeks re-thinking the concept and we re-pitched Atari with an "Enhanced Edition" as opposed to an "HD" version. We discussed the implications of a non-HD version and we had to renegotiate royalty terms to get the deal back on track. We basically had to completely discard our plans and start anew after almost a year of negotiation.
 
Click for larger version

The end result is a little less graphical flash for launch than we had initially planned, but we actually had a bit more time to make more widespread improvements as a result, so the project is different; in some ways larger, but still pretty awesome. The key learning here is: don't panic and always have a towel, because you never know when you are going to be surprised... and towels can be very useful.

 
Article Start Previous Page 4 of 5 Next
 
Top Stories

image
Microsoft's official stance on used games for Xbox One
image
Keeping the simulation dream alive
image
A 15-year-old critique of the game industry that's still relevant today
image
The demo is dead, revisited
Comments

Jonathan Parsons
profile image
BG:EE had one hell of a bumpy and buggy start at launch, but most of the issues seemed to have been ironed out (For me at least). Hopefully they learned a lot from the game's launch so that BG2:EE's release, which I'm purchasing without a doubt, will be quite a bit smoother. Best of luck devs. =)

www.OgreJungle.com - gaming news and reviews.

Glen M
profile image
Great article. Baldur's Gate was the first time I thought they have done it, they have transferred the table top experience to the PC. Then of course I thought why haven't my players been using summon monsters it seems so useful, most remember not to tell them.

Jordan J
profile image
they need to release this for android already

Tomasz Podolec
profile image
Retina version of BG:EE would be great, but it looks like it's not possible because of lack of original artworks, am I right?

Joshua Oreskovich
profile image
I am surprised they stayed so true to the original artwork without trying to make it look more like WoW ... accidental missing original art or not.. I like the appearance.

Kenneth Baird
profile image
I am sad they lost the source art. I wonder if it still exists for the other infinity games?


none
 
Comment:
 




UBM Tech