SimCity UI Code + DRM
51–60 of 66 posts
Re: SimCity UI Code + DRM
#52How is it cool to put someone else's non-free copyrighted work on github? I'm not a fan of DRM or what they did to Sim City... I've also got nothing against reverse engineering, excerpting code snippets, and that sort of thing. But violating the terms of GitHub, in addition to someone's copyright? Not cool.
Its uploaded in a nonprofit way, for educational purposes. It is a very small portion of the complete work. The effect of the use upon the potential market is either small or non-existant.
That is three out of the four-factor balancing test regarding fair use. If we guess that this is about 0.3% of the complete work (3MB of a very very large final product), that would be comparable to use 30s clip of a film.
Re: SimCity UI Code + DRM
#53Earlier quoted context omitted.
In general, the code is dense and difficult to read. If you know what to look for, there are a few idioms scattered around that stand out as awkward, but save a few characters here and there. There are some pretty obvious examples right at the beginning, lines 2 and 4: var COMPILED = !0 goog.DEBUG = !1 As you would expect in a weakly-typed C-style language, !0 == true, and !1 == false. JavaScript has first-class bool…
On the subject of minification, I see a lot of lines that look like this[1]: fireToken : 1 === f.tradeTokens.data.fireToken ? !0 : !1, Why might that be a desired output from a minifier? Why not simply fireToken : 1 === f.tradeTokens.data.fireToken, [1] https://gist.github.com/anonymous/5133829#file-simcityui-js-...
fireToken: f.tradeTokens.data.fireToken === 1 ? true : false
In my company I see JS code like the following: if (!!someFlag) { /* ... */ }Re: SimCity UI Code + DRM
#54It 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.
Re: SimCity UI Code + DRM
#55Earlier quoted context omitted.
In general, the code is dense and difficult to read. If you know what to look for, there are a few idioms scattered around that stand out as awkward, but save a few characters here and there. There are some pretty obvious examples right at the beginning, lines 2 and 4: var COMPILED = !0 goog.DEBUG = !1 As you would expect in a weakly-typed C-style language, !0 == true, and !1 == false. JavaScript has first-class bool…
On the subject of minification, I see a lot of lines that look like this[1]: fireToken : 1 === f.tradeTokens.data.fireToken ? !0 : !1, Why might that be a desired output from a minifier? Why not simply fireToken : 1 === f.tradeTokens.data.fireToken, [1] https://gist.github.com/anonymous/5133829#file-simcityui-js-...
Re: SimCity UI Code + DRM
#56Earlier 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…
Does anyone have any experience / is Chromium Embedded any better than using the WebKit component that is part of Qt 5.0 (QtWebKit)? Both seem to use same JavaScript engine (V8) and it seems that using QtWebKit in headless browser scenarios in Linux environment seems to be a bit easier, but I'm kind of wondering why there seems to be more buzz around CE than QTWK. On obvious reason of course is that using QTWK in app "forces" you to use Qt in other parts of the app that can be a good / bad thing depending on the details.
Re: SimCity UI Code + DRM
#57How is it cool to put someone else's non-free copyrighted work on github? I'm not a fan of DRM or what they did to Sim City... I've also got nothing against reverse engineering, excerpting code snippets, and that sort of thing. But violating the terms of GitHub, in addition to someone's copyright? Not cool.
The uploader has a decent argument of fair use. Its uploaded in a nonprofit way, for educational purposes. It is a very small portion of the complete work. The effect of the use upon the potential market is either small or non-existant. That is three out of the four-factor balancing test regarding fair use. If we guess that this is about 0.3% of the complete work (3MB of a very very large final product), that would b…
Fair use is meant to preserve access to copyrighted works by the public that granted copyright in the first place--to maintain certain rights for the public and to ensure that any works built upon copyrighted works (whether that's through inspired creativity or just commentary on the original) aren't themselves held hostage by the original copyright holder.
Nothing in this example is transformative of the original work. The poster just released something that somebody else holds the copyright to. The educational aspect is an extremely weak argument; something merely existing in front of your eyes is not educational. The classic take on educational fair use for this would be taking minimal samples from the source and providing commentary upon them (why they did something the way they did, how they solved a problem that plagues a lot of developers, etc).
It's also certainly not a minimal sampling of the material. The code has been minified, but there appears to be a substantial portion of their UI code intact here, and I wouldn't be surprised if it is largely functional without much more work. It would be dishonest to compare 3MB of scripts to a final game including assets, and even with substantial commentary and insight added to the code, you would not be able to justify redistributing this amount of the source. Again, it isn't quoting from a larger source, it's providing the entire source for large portions of the game engine.
IP law aside, I feel the same way about this as I imagine I would have felt if the Doom 3 source had leaked early: no, you won't be able to play the game for free with it, and it is cool to see, but it's shitty that the people that actually wrote it had no say in its release.
Re: SimCity UI Code + DRM
#58Perfect example of how JavaScript is not good for app programming. It is great for little tasks, but does not scale well. Please create a standard for a browser VM instead of this JS as ASM workaround that everyone is starting to use.
What didn't scale was the server-side. The client-side is just fine.
As for the idea of a browser VM, it is a world we live in. Welcome to the wonders of Java applets.
Re: SimCity UI Code + DRM
#59Earlier 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.
I'm pretty sure the server is running some, if not all, of the simulation code, in order to prevent cheating. If they just blindly trust client updates, I can simply send an update that gives me another million simoleons.