4 ms·
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!
by SchizoDuckie 14y ago
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_AddHourlyIncomeCheat")
}
Also pretty nifty: There's a rest api built into the game for communication, (as wel as websockets) and the name and email of one of the programmers are still in the code.
simcity.TutorialFakeUserData.creator = {
uri : "/rest/user/0",
tutorialState : 1,
id : 0,
screenName : "Chet Keno",
email : "mayorkeno@simcity.com",
nucleusId : 0,
lastLogin : 0,
isOnline : "true",
avatarImage : "Graphics/Tutorial/tutorial_avatar_keno.png",
cities_count : 1
};
Also interesting is that it seems that this is not just a stripped v8 engine. There's things in the code that make me think the whole game UI is actually a pretty decent webkit engine:
simcity.gEventManager = new simcity.cEventManger;
simcity.gEventTypes = {
CLICK : "click",
MOUSEUP : "mouseUp",
MOUSEDOWN : "mouseDown",
MOUSEOVER : "mouseOver",
MOUSEOUT : "mouseOut",
ITEMSELECTED : "itemSelected",
KEYUP : "keyup",
KEYDOWN : "keydown",
DATACHANGED : "dataChanged",
HASHCHANGED : "hashChanged",
GENERICEVENT : "genericEvent",
SOCKETEVENT : "socketEvent",
SOCKETCONNECT : "socketConnect",
SOCKETDISCONNECT : "socketDisconnect"
};
simcity.SocketManager = {};
simcity.cSocketManager = function () {
this.mSocketListeners = [];
this.mSocketRequests = [];
update: It could be leftovers, but this indicates that this is code from a prerelease/debug build.
simcity.SetUpDemoScreen = function () {
simcity.persistentLayout = gUIManager.LoadLayout("Layouts/PersistentPreAlpha.js", gUIManager.GetRootWindow());
simcity.SetTextOnElement(simcity.DemoExitButtonTxt, new scrui.cLocaleString("Tutorials.json", "0x0eaf7bc9", "EXIT"));
simcity.SetTextOnElement(simcity.DemoAvailableReleaseDateTxt, new scrui.cLocaleString("Tutorials.json", "0x0eaf7bb2", "AVAILABLE FEBRUARY 2013"));
simcity.SetTextOnElement(simcity.DemoThanksForPlayingTxt, new scrui.cLocaleString("Tutorials.json", "0x0eaf7b4b",
"THANKS for PLAYING"));
simcity.SetTextOnElement(simcity.DemoPreOrderTxt, new scrui.cLocaleString("Tutorials.json", "0x0eaf7bb1", "PRE-ORDER AT SIMCITY.COM"));
simcity.SetTextOnElement(simcity.DemoNotFinalSoftwareTxt, new scrui.cLocaleString("Tutorials.json", "0x0eaf7b3c", "Not Final Software"))
};
- kristofferR 14y agohttp://telemetry.simcity.com/simcity/ http://telemetry.simcity.com/simcity/ That's the REST url
- smhinsey 14y agoChet Keno is also the name of one of the mayors of a neighboring town during the tutorial.
- kevingadd 14y agoYeah, 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).
- mrgoldenbrown 14y agoThe "DRM" that has upset most people is the (allegedly unnecessary) requirement to have a constant connection to the EA servers in order to play. The argument is that the minimal interaction with other cities on the server could easily be done client side, if EA wanted to allow an offline "single player" mode.