Portable Code - The Trials of Porting Total War from Windows to Mac OS X

By Tom Miles & Guy Davidson

For nearly fifteen years Creative Assembly's Total War franchise has carved out a fanatical following amongst Windows gamers. A real time strategy game of considerable complexity, think Risk meets table-top warfare, the code base is on its third iteration. Throughout development the Microsoft tool set has been used, a quite relaxed compiler amongst its peers. In 2011 the decision was taken to branch out to a new audience: the Mac user. This required the code base to be ported to a different compiler, and it was only then that the nature of portable code was truly discovered. In this presentation, Tom and Guy will tag-team their way through the history of the Total War programming team and the code base iterations, the journey through not two but three compilers, four IDE's and more 'standard' implementations than they care to think about, the despair engendered by Clang's Two-Phase Name Lookup, and the relief at the unearthing of Premake. Along the way they will discuss 64-bit programming pitfalls, unity builds, fostering communication between a programming team of two, writing portable code, and persuading a large development team of varying levels of skill to write portable code as well, in addition to maintaining, publishing and enforcing suddenly expanded coding standards. Delegates will take away a renewed vigour to write standard-compliant code and to test builds on multiple compilers, and additional insight into how to do so.