Discovering your legacy in a Perforce database



"You can go back and back and see the geology, the layers of all these previous Civilization designers' hands in the codebase."

But sometimes, you just want to burn everything to the ground



"It's hard to be airdropped into something that's seen this much iteration; you just have to sort of run with what you've got."

When I called upco-lead designers Will Miller and David McDonough last month to chat about their development process, I didn't expect to spend nearly half an hour talking about board game design."I could probably spend a whole interview exploring what board games can teach designers," says McDonough, with what sounds like a rueful laugh. To make your game playable on a board, you have to figure out how to elegantly convey complex systems. If your board game is boring, obtuse or tedious, says McDonough, you'll know it -- the groaning and moaning of your players will make sure of it.While theprototyping process went beyond making board game mockups, McDonough says this kind of hands-on prototyping with paper and cardboard helps Firaxis designers figure out how to gracefully lay out the core systems of their games."For a game like, with its very many interlocking systems and layers of gameplay, trying to imagine how to do that in a board game can be a great way to lay out the skeleton of a game with that kind of weight," says McDonough, "without overbalancing it."But that skeleton includes some old bones -- chunks of a legacy codebase that links McDonough and Miller with previousdesigners like Soren Johnson, Brian Reynolds, and Sid Meier.To hear Miller tell it, a lot of the low-level code underlying establishedsystems like tiles and city management has been carried over (in some form or fashion) from earlier games in the series -- all the way to back to the originalgame released in 1991."One of my favorite parts about working in thecodebase is that it's very stratified," says Miller. "There'scode rattling around in there, somerattling around in there, and you can kind of see the evolution in style and approach between games."Working with that codebase helped Miller and his fellow developers understand how thegames have evolved from a very C-centric design to a more contemporary data- and script-driven approach to development."It's really fascinating to go back in the Perforce history and just kind of look and see 'Oh, here's where Soren [Johnson] started working on it, because all the APIs are camelCase," says Miller. "You can go back and back and see the geology, the layers of all these previousdesigners' hands in the codebase."McDonough agrees, and admits to looking back at comments on old code to better understand why design decisions were made in developing earliertitles and using that knowledge to tackle design quandaries onLike many developers, Firaxis also maintains an internal repository of prototypes that developers have created and shared with their colleagues. Unlike many developers, Firaxis' database contains old projects by game industry veterans like Sid Meier and Soren Johnson that the designers ofcan look to for inspiration."There are so many games rattling around in our network and on our Perforce servers that will never be released," says Miller. "It's really fascinating to look back through the archives and see some of these games, how they're put together, then play them and see what was successful."Miller's proud of this archive, painting it both as a useful resource and an expression of studio culture that he and other Firaxis developers rally around. "We hang on to all this stuff; it's our history, it's who we are."The weight of that legacy codebase can be burdensome; while theteam wrote fresh code to govern the lion's share of the game's systems, they had a tricky time integrating that work with some legacy code. "We couldn't burn everything to the ground, like probably every engineer wants to do," says McDonough. "It's hard to beairdropped into something that's seen this much iteration; you just have to sort of run with what you've got and make the best of it."Making the best of it often entails rewriting large swathes of code to allow for systems that weren't imagined by earlier designers. Both Miller and McDunough take pride in calling themselves designer-programmers, a hybrid role that they feel empowers them to make design decisions with an understanding of (and ability to manipulate) the code."When the designer has that kind of agency, and the agency is institutionalized, we can adapt to problems quite quickly," says McCullough. Firaxis is currently structured so that both he and Miller report to the director of software development -- the same person who manages the engineering team -- rather than a design director or someone like Sid Meier.McCullough claims being a good engineer is held in high regard within Firaxis, a cultural shibboleth that he acknowledges might not appropriate for other studios with more diverse remits."We can get away with this because we're a strategy game shop," chimes in Miller. "I think strategy games uniquely cater to the highly iterative work of a designer/programmer hybrid."I ask for examples, and McCullough is quick to point out the trouble he ran into while designing the new Planetary Wonders in. They're high-value structures that require their own tile on the map, yet aren't considered units or cities; they needed to be attackable by other players, but thecodebase wasn't designed to allow that."It's a fundamental assumption that was endemic to the codebase, that only cities are combatable," says McCullough. "I had to effectively undo and rewire in the concept of a combatable site, of which a city was just one instance."The designer/programmer says he would have been scared of entering a design meeting and advocating for making Planetary Wonders attackable entities if he hadn't been comfortable doing the work himself."Being comfortable with native code and being a programmer by trade, I just went ahead and took care of it," adds McCullough. "And it wasn't a big deal, and we got our Planetary Wonder feature; we got our design the way we hoped it would be."