Friday, October 17, 2008

Software Engineering @ Electronic Arts

Before I started my time at EA, I was fully expecting to be doing simple supportive tasks, like documentation or managing build systems and so forth. Work that didn’t involve laying my hands on the actual game, because quite a few companies in the ATAP list don’t have the practice of giving interns full access to the company’s crown jewels.

And boy was I wrong. One of the first things I had to do on the job there was dive into the FIFA Online 2 source code and documentation. That’s more than 400,000 lines of C++ code with lots of proprietary subsystems to support the game, a nebulous implementation to say the least. It was a very daunting task, even till the end of my internship, I only managed a rough understanding of just the major parts of the code.

But one has to admire the technical achievement of those 400,000 lines of code. FIFA Online 2 is a networked game for up to 6 concurrent players that could run consistently at 30 frames per second. I’ve taken CS4344 (Networked and Mobile Gaming) before, and in that module you learn about many techniques for making games perform correctly in a networked environment, and it is no easy task at all. And although FIFA Online 2 shares many similarities with its console siblings, deep inside, it’s a different beast altogether because of these online constraints. Making a game like FIFA Online in a best-effort communications environment like the internet, meant that a lot of mechanisms had to go into the game to make it resilient to network delays and loss events. And it’s not just about coping with the characteristics of a network, it’s also about 400,000 lines of code running in REAL-TIME. I don’t know about you, but that’s a feat of engineering to me.

A lot of my time at EA is about absorbing all that engineering innovation that went into the product and applying them to the things I did. I worked on a couple of In-House tools, created my own custom builds of the game, designed a small code library for tool development, unified 2 different database access technologies under a single library, and I even started a Wiki server for documentation. So as you can tell, all that involved a spectrum of development skills. I’ve added a couple of videos to give you a better idea of what FIFA Online 2 is about.

That's JC, one of the producers at the Singapore Studio.

Some screenshots of the game

To further illustrate, my company has graciously given me permission to talk about one particular in-house tool I did at EA. And we call it the FIFA Asset Verification Tool. A tool for ensuring that assets were correctly integrated into the game. Assets, by the way, are game dev lingo for artwork, 3D models in this case, and the studio has a rather complicated asset pipeline that turned the Maya artwork that the artists did into resources that were loaded by the game. Often artists needed to verify their work in the game and before this tool it was a rather cumbersome process. Furthermore, they couldn’t mix and match soccer players with various team uniforms and animations.

FIFA Asset Verification Tool

The tool exposed many hidden functions in the game by loading a custom-built DLL of the game and initializing the various database, rendering and animation subsystems to generate what you see in my screenshot. From a technical perspective, this tool involved:
  • Win32 Programming
  • Software Engineering
    • Code-reuse via the concept of DLLs
    • Software design that enabled 2 separate applications to work together
    • Advanced C++ programming.
  • Working with EA proprietary subsystems for Rendering and Animation.
  • Some Computer Graphics
  • ODBC and EA Proprietary Database access.
But the really important point for talking about this tool is that about 60% of the stuff that went into the tool came from things I had to learn while on the job. That’s 60% of stuff that didn’t come from things I learnt in school. And I think that “60%” is really a defining aspect of what ATAP (Advanced Technology Attachment Programme) is all about. ATAP is a platform for students to learn beyond the classroom, but it is also a glimpse into what it takes for one to be ready for the industry. And I think that our time here in SoC can only gear you to be prepared for that “60%”, to equip you with solid fundamentals that will enable you to remain relevant throughout your career.

If I were to map those fundamentals into the modules we learnt in school, here’s what I believe geared me for my internship:
  • Software Engineering (CS2103)
  • Database Systems (CS2102)
  • Computer Networks (CS2105)
  • Operating Systems (CS2106)
  • Computer Graphics (CS3241) 
  • Game Development (CS4343)
  • Networked and Mobile Gaming (CS4344)
The thing about making games is that it is first and foremost about software engineering. And to be a good software engineer, isn’t just about being good at programming, it’s also about being able to design software that’s easily understood, it’s about working smart and working as a team with colleagues from many different backgrounds. Making games draws from many different disciplines, from Psychology & Sociology to Marketing & Creative Arts. Computer Science is just one link in that chain.

In summary, here are the key takeaways from my post about the internship.

  • Self-paced learning approach
  • Unfettered access to source code and EA technology
  • Learn and apply things not encountered in school.
    • Windows Programming
    • Software Engineering Practices in terms of code reuse and library design
    • Game Architecture and Networked Gaming design
    • Advanced C++
I’d like to end off with a comment that my mentor at EA once said over lunch. It was during my first weeks as an intern and he was asking if I participated in any open source development, or if I made any games, or embarked on any personal projects. Sadly, my answer to all of the above back then was no, and he replied firmly: “Well, get involved!”. I'm getting myself involved now, thanks to these guys at EA. With that, I'd like to thank Chris Chua, Nigel, Venky, Alex, Haibing, Megan, Kee, BK, Adrian and the rest of the EA gang. This post is dedicated to you guys.

- Shijun

No comments: