A lot of code was rewritten to get that game playable offline.
Simon Fox, lead engineer on the Single Player Mode for SimCity, jumped on the SimCity website and explained why the impossible was made possible -- allowing gamers to play SimCity offline. Believe it or not, he claims that the SimCity team began working on the offline mode effort soon after fans began requesting the feature. Unfortunately, the move wasn't as simple as flipping a switch.
"The original creative vision for SimCity was to make a game where every action had an effect on other cities in your region," Fox writes. "As such, we engineered the game to meet this vision, setting up the player's PC (client) to communicate all of its information to the servers. That means that our entire architecture was written to support this, from the way that the simulation works to the way that you communicate across a region of cities."
"So yes, while someone was able to remove the 'time check' shortly after launch, they were unable to perform key actions like communicating with other cities that they had created locally, or with the rest of their region(s), or even saving the current state of their cities," he adds. "My team did, however, see a path forward towards Offline, one that would maintain the integrity of the simulation."
He writes that SimCity was written to rely on servers. The game pings these servers for critical pieces of data, and relies on that information to keep the simulation moving. To get the game to function offline, the team had to rewrite the entire system -- which was written in Java -- in C++. The team also "knocked out the Internet pipe stuff," meaning there's lots of code that hits the servers looking for information, and a lot of code was written to produce that information locally.
"Our game routes pieces of data from one city to another as data flows through the regions," he writes. "All of that code exists on the server, and now we've brought all of that down into the client. The client processes the region box, which is what all of the cities pushes their data into. We've brought that down into the client as well."
By the time the team was finished, they spent over six and a half months working to write and rewrite core parts of the game to get the offline mode to work. The blog entry goes on, which can be read in full here.