• Moose
  • Sign in to follow this  
    Followers 0

    Engineering SimCity for Offline Play


    Dirktator

    Simon Fox, Lead Engineer, Single Player Mode

    Hi, I’m Simon Fox, lead engineer on the Single Player Mode for SimCity, and I’m here to tell you more about how we engineered Offline gameplay for SimCity.

    When the game released, our fans were calling for Offline. I rallied the team to start making that happen as soon as practical after launch.

    REENGINEERING A CREATIVE VISION

    The original creative vision for SimCity was to make a game where every action had an effect on other cities in your region. 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.

    My team did, however, see a path forward towards Offline, one that would maintain the integrity of the simulation. Lucy once said that Offline wouldn’t be possible “without a significant amount of engineering work”, and she’s right. By the time we’re finished we will have spent over 6 ½ months working to write and rewrite core parts of the game to get this to work. Even things that seem trivial, like the way that cities are saved and loaded, had to be completely reworked in order to make this feature function correctly.

    REWRITING KEY PIECES

    I wish it were as simple as flipping a switch and telling the game to communicate with a dummy client rather than our server, but it’s more than that. Entire calculations had to be rewritten in order to make the game function correctly.

    SimCity was written to rely on the servers. The game routinely pings the servers for critical pieces of data (region status, workers, trading etc.) and it relies on that information to keep the simulation moving. This meant rewriting the entire system, which previously existed in Java, and putting it into C++. We’ve had to knock out the internet pipe stuff. There’s lots of code that hits the servers looking for information. We’ve had to write a lot of code to produce that data locally, specifically for region information.

    Our game routes pieces of data from one city to another as data flows through the regions. 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.

    And now, all of the regional simulation needs to be done locally. The algorithms governing trading between cities needed to be retuned in order to make the behavior between cities more responsive for this type of play. This in itself required major optimizations in order to run the simulation locally. We have an obligation to make the game fun and functional on all specs of machines. We wouldn’t want someone who was enjoying the Multiplayer game to find the Single Player game crippled due to poor optimization.

    And it’s not just adding, we had to remove parts of the game for it to function properly as well. This means removing lots of code integral to Multiplayer include code and UI supporting Trading, Social Features, Global Market, Leaderboards and Achievements. And, all without crippling the Multiplayer game.

    So where are we at right now? We’ve been working on this since August and now, we’ve hit Alpha and are in the final stages of testing before we release it as part of Update 10 in the future. On behalf of the engineering team, thank you for your patience on this one. We know you want Offline play in SimCity and we are really happy that we are finally getting ready to deliver it to you.

    Source: http://www.simcity.com/en_US/blog/article/engineering-offline-play-for-simcity

    Visit Source


    Sign in to follow this  
    Followers 0


    User Feedback


    Freddyeddy

    Posted

    So glad this is coming but I just can't help but imagine... instead of spending 6.5 months to re-engineer something to be offline when it arguably "should" have been offline in the first place, and instead putting 6.5 extra development months making the engine and game more kick-ass... we'd have a kick-ass game today? 

     

    Still, good move Maxis... I hope this doesn't imply an EA exit strategy that once we get offline, and mod support, that's it for future development...

    Share this comment


    Link to comment
    Share on other sites
    §haÅ--Ñ€ §hÅŽo

    Posted

    While is was a good move, I don't plan to buy SimCity 2013 still if it remains only available with Origin.

    Share this comment


    Link to comment
    Share on other sites
    Tzulptuth

    Posted

    EA, you've lied to the community, accused it of homophobia, and given us a really poor game. Now you come throwing these scraps at us in the hopes you can squeeze some more money from this disaster.

    Please, EA, take your moddability and offline mode and shove it you-know-where. And every dollar you make on this game, split it into dimes and shove it up there, too. Until it says "click".

    Add bigger maps, better transport - I won't touch it with a stick. For the sake of principles.

    Share this comment


    Link to comment
    Share on other sites
    A Nonny Moose

    Posted

    An expensive lesson wasn't it?  For the short term of pleasing the "modern" gaming community, EA has commit suicide with respect to the customer base of long standing. 

     

    Horses for Courses is required strategy.  Now just why did you have to convert from Java to C++?  Doing critical sections in C++ is quite arcane, so why not just go to something more friendly like C#?

     

    However, philosophical arguments aside, now that you are in C++, I truly hope you have abandoned Visual Studio and come in from the cold to the more universal publicly accaimed GNU gcc which has full ISO compatibilities with no special deals with the O/S.  Who knows, I might be attracted to something I could run native mode on my Linux box.  If this means giving up some stupid lock-in from MS, well, so be it.  You've now blown the budget, so a little more overrun will surely not matter.  Just some more work on the makefile.

    Share this comment


    Link to comment
    Share on other sites
    citymaster95

    Posted

    So glad this is coming but I just can't help but imagine... instead of spending 6.5 months to re-engineer something to be offline when it arguably "should" have been offline in the first place, and instead putting 6.5 extra development months making the engine and game more kick-ass... we'd have a kick-ass game today? 

     

    Still, good move Maxis... I hope this doesn't imply an EA exit strategy that once we get offline, and mod support, that's it for future development...

    Next Bigger Maps

    Share this comment


    Link to comment
    Share on other sites
    moaku

    Posted

    The game is not in java... It just uses NodeJS as a scripting engine... It does not require javavm to run, so it's not in java, period.

     

    Sad to see Maxis/EA still don't understand after all this time that tons of people of the Simcity franchise fanbase are geeks and they can't fool them with such open lies about verifiable technical points to try to justify extremely slow work (which took a week to do for a modder at game launch).

     

    And even more sad to see that some people still do believe them.

    Offline mode is a good thing, however it's too late now. Only decent map size combined with offline mode could save the game. and decent map size is not comming because glassbox is way too heavy to handle it, and will always be. The only way to get it would be to get rid of glassbox, and go back to a non-individual approach... And since the "individual" aspect of the game sims is a lie since numbers are fudged, it would be a good thing to step back to "macromanagement" instead of fake-individualized simulation. btw that's not happening for this game. You can hope for it for a new simcity in the future, but I wouldn't count on it as long as it's EA who take decisions in the end. EA only cares about their wallet, and the game sold, thanks to it's name only, so basically, they are happy with it now.

    Share this comment


    Link to comment
    Share on other sites
    A Nonny Moose

    Posted

    Only a Truth and Reconciliation Commission will save EA now as far as the SimCity franchise is concerned.  They should consider selling this asset to a more technically inclined outfit, as they have now made their nickel and from here it is going to be all down hill.

    Share this comment


    Link to comment
    Share on other sites
    NCGAIO

    Posted

    The game is not in java... It just uses NodeJS as a scripting engine... It does not require javavm to run, so it's not in java, period.

    Just a observation ... nobody said anything about a java code programmed in the game but only that are making as locally generated the shared data that the simulation would catch on the servers (so the use of JS) because otherwise they would have to rewrite it to removing this content.

    Is why he cites that not as easy as just emulate a local server just to be able to run the game as done by the hackers. .

    Also the game will also save locally the graph content rather than the strings sent to the service and at this point for sure are having some work with RenderWare.

    I fully agree with dissatisfaction about a false simulation after they have done so much advertising extolling precisely the opposite but this is now unalterable.

    It would be easier to develop another simulator and only for what's there they already took more than three years not to mention that as we all already know the heart of the development team now inhabits another body.

    Share this comment


    Link to comment
    Share on other sites
    LivingInThePast

    Posted

    Well, finally SimCity is moving toward a sellable product.

    Share this comment


    Link to comment
    Share on other sites
    Intrepid

    Posted

    I think credit where it is due is deserved. Updating the game to make it offline is a very welcome move from EA and I am grateful that the decision to make it so was made.

    However an offline mode will not entice me to buy the game.

    Here is what will;

     

    No compulsory Origin client, just a one-time activation to the internet and keeping the disk in the drive is good enough. More people have used piracy methods on their genuinely purchased products just to avoid the origin client than actual piracy.

    Larger City Tiles please. 

     

    Modding tools.

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an Account  

    Sign up to join our friendly community. It's easy!  :thumb:


    Register a New Account

    Sign In  

    Already have an account? Sign in here.


    Sign In Now