Live data from Hacker News

SimCity UI Code + DRM

gist.github.com

31–40 of 66 posts

Re: SimCity UI Code + DRM

#31
post #21

Earlier quoted context omitted.

I think it's worth noting that older versions ran completely fine executing the totality of the required code...

Note also that the last version of SimCity was launched in 2003, running on a completely different engine with a completely different simulation model. The Maxis team has talked quite a bit about the challenges in making their agent-based simulation engine, Glassbox, performant on low- and medium-spec PCs.

The bit that stands out for me is that the last SimCity was single-threaded so even on modern multi-core machines it chugs.

SimCity is one of those games that would benefit hugely from multi-core computers so I find the whole "We moved core functions to our servers because your computers are too puny" reasoning to be lacking.

It seems obvious that the only reason they moved processing functionality to their servers is because they have to calculate the inter-region stuff which they cannot reliably farm out to untrusted clients.

Basically they decided that the new SimCity would be a "Social" game from the outset and architected around that, the DRM side-effect is just an added "bonus" for Maxis/EA.

Of course many people (Myself included) just want a new single-player SimCity... Hell I would even take the last SimCity with corrected routing and multi-thread support.

Re: SimCity UI Code + DRM

#32
post #17

It would be an interesting project to offline the game - but I do wonder how hardcore the calculations are that run it. Would it be realistic to run the game itself and the server-side simulation stuff (nulling input from other cities) on an ordinary desktop computer? Or would you definitely need a secondary machine?

I highly doubt there's any significant calculation. If there was, EA would have to rent hundreds of thousands of EC2 instances to cover the running of the game.

On the other hand, if there's no significant calculation on the server, why would EA pretend they were having massive load problems? Sure, maybe they wanted to get some headlines about 'SimCity is so popular it's having launch shortages', but there's got to be a happy medium between "friendly headlines talking about SimCity's popularity" and "seething EA hatred plastered across the Internet".

Re: SimCity UI Code + DRM

#33
post #30
post #22

Earlier quoted context omitted.

>I'm wondering if it's a common practice to write UI code in games in javascript It's becoming more common. Libraries like Awesomium[1] make it trivial to render browser content to an in-game texture and the V8 engine, while not 'easy' to integrate, is quite empowering in that you can have the UI code call directly into your compiled code. >does SimCity have some type of v8 or other js engine packaged with it? Very p…

FWIW, we were much happier with Chromium Embedded [1] than Awesomium. Awesomium is not free for non-commercial use (something like $8,000+ if you wanted source code included, the price of the software isn't even listed on the site now), the support was terrible, and the product seemed to be not nearly as fleshed out at Chromium Embedded. The website is prettier though... We switched to using Chromium Embedded 6-8 mon…

We are starting to use Chromium Embedded for all of our in-game UIs, after going through Flash and (for a brief period) CEGUI. No major regrets here. In fact, we like HTML so much that we are considering moving our game tools (level editors, etc) to HTML as well, ala Insomniac [1].

[1] http://www.insomniacgames.com/new-generation-of-insomniacgam...

Re: SimCity UI Code + DRM

#34

It would be an interesting project to offline the game - but I do wonder how hardcore the calculations are that run it. Would it be realistic to run the game itself and the server-side simulation stuff (nulling input from other cities) on an ordinary desktop computer? Or would you definitely need a secondary machine?

According to this (http://www.reddit.com/r/SimCity/comments/19xx7d/trying_some_...) the game runs completely fine without being connected to the server, just all the mp features won't work. All the server does is handle trading, leaderboards, regions and validation etc

Re: SimCity UI Code + DRM

#35

Earlier quoted context omitted.

Quite some game UI's are done in Flash (check out ScaleForm by Autodesk: http://gameware.autodesk.com/scaleform ) so using JavaScript seems plausible as well.

Some older games had the menus fully rendered in openGL. I'm not sure which is better, but I would think our society has more domain experience making menus with flash than with openGL.

exactly, the tooling and skillset for interface design/dev is extremely mature these days, and it probably isn't economical to move people onto custom solutions.

Re: SimCity UI Code + DRM

#36
There's lots of instances like

    if (something....)
        return !0;
    else
        return !1;
is there any reason why they aren't simply using `true` and `false`?

(because !1 is defined to return literally `false` and !0 to return `true`)

Re: SimCity UI Code + DRM

#37
post #17

Earlier quoted context omitted.

I highly doubt there's any significant calculation. If there was, EA would have to rent hundreds of thousands of EC2 instances to cover the running of the game.

On the other hand, if there's no significant calculation on the server, why would EA pretend they were having massive load problems? Sure, maybe they wanted to get some headlines about 'SimCity is so popular it's having launch shortages', but there's got to be a happy medium between "friendly headlines talking about SimCity's popularity" and "seething EA hatred plastered across the Internet".

I think it was just poor scalability engineering. They didn't expect that many users on launch and they didn't implement a system that could scale upwards.

Re: SimCity UI Code + DRM

#38

There's lots of instances like if (something....) return !0; else return !1; is there any reason why they aren't simply using `true` and `false`? (because !1 is defined to return literally `false` and !0 to return `true`)

Likely was "true" in the original source (and the source in separate files) and was replaced by some minifier. Not clear if these are the files verbatim or if it was automatically formatted from minified js.

Re: SimCity UI Code + DRM

#39

Earlier quoted context omitted.

Note also that the last version of SimCity was launched in 2003, running on a completely different engine with a completely different simulation model. The Maxis team has talked quite a bit about the challenges in making their agent-based simulation engine, Glassbox, performant on low- and medium-spec PCs.

The bit that stands out for me is that the last SimCity was single-threaded so even on modern multi-core machines it chugs. SimCity is one of those games that would benefit hugely from multi-core computers so I find the whole "We moved core functions to our servers because your computers are too puny" reasoning to be lacking. It seems obvious that the only reason they moved processing functionality to their servers i…

Indeed, many people are unhappy that this is not an upgraded SimCity of old. Perhaps that would have been a good thing, perhaps not, but that is certainly a different product than what they shipped. Either way, SimCity (2013) is an entirely different game from SimCity 4, even though the name is shared.

I'm not sure to what degree exactly the new SimCity was optimized for multicore, but just a cursory glance suggests that is making use of all 4 cores in my machine. In terms of what they actually shipped to be calculated in the cloud, my guess would be macro-economic and trade conditions, as well as regional dynamics. These require a view of all the data from the region, and are thus best computed live centrally.

Re: SimCity UI Code + DRM

#40

3.5 mb of Javascript. Glug. Looks like just the game ui. I cannot really find references to DRM like the title says. Lots of nice references to cheats though! They all rely on simcity.DEBUG being true, if (simcity.DEBUG) switch (a) { case scrui.kKeyCodeDigit1: c && (e && !d) && scrui.RunCheat("scgameui -unlockalltools"); break; case scrui.kKeyCodeLetterW: c && (e && !d) && simcity.CreateUnit("T_RCI_AddHourlyIncomeChe…

Yeah, it's not just v8. It's EAWebKit, a WebKit fork EA has been using in various games (You can find the source releases on their site).
Post reply on HN