How to edit c2runtime.js on Mac without using Construct/SDK

For developers using the Construct 2 Javascript SDK

Post » Tue Sep 13, 2016 2:35 pm

@Ashley

Hi, I currently can't run Construct 2 because I have a Mac, and I'm trying to develop a game on an HTML5 site. I purchased a car racing game from codecanyon.net which came with the .capx file as well as the HTML5 export, and I would like to add some functionality into the c2runtime.js file right when the game loads. (Preferably as soon as the load screen disappears, before the game starts -- it has a "tap to start" function).

Any ideas on how I can pinpoint the game init inside the gigantic c2runtime.js file? I've read on here and throughout some google searches that the runtime file is purposely made to be hard to read, but at this point, I'll take any help I can get!

(Also, if I'm completely crazy, and I CAN use the javascript SDK without the actual Construct 2 application, please let me know. I'm new to this, haha.)

Thanks!
B
2
Posts: 1
Reputation: 152

Post » Tue Sep 13, 2016 4:36 pm

Given that you don't have a pc, and probably don't have a C2 license which you need if you plan on making any profit from a game made or edited with the editor, I would contact the author, and see if they can do it for you.
Image ImageImage
B
168
S
50
G
164
Posts: 8,231
Reputation: 105,581

Post » Tue Sep 13, 2016 5:25 pm

Modifying c2runtime.js isn't really feasible. When the project is exported the JavaScript of the runtime and plugins are minified so they aren't readable, but on top of that the events or logic of the capx is probably in data.js and that is only readable by the JavaScript portion. In short it's not worth the effort to reverse engineer the export to be able to make changes.

The most I've seen someone do is change a setting after an export.
B
91
S
31
G
103
Posts: 5,237
Reputation: 67,760

Post » Wed Sep 14, 2016 11:00 am

This is deliberately designed to be practically impossible to prevent games being reverse-engineered. So I wouldn't even try.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest