Visualize the html5 code behind

Get help using Construct 2

Post » Fri Mar 15, 2013 2:41 pm

Im trying to visualize the html5 code that this program creates -for what i understand xD-
I cant find a way though, when i open it with a text program, it just shows the computer language it seems (tons of weird symbols)
So...yeah, how can i see the code created? I think it might be useful so some people that dont use this program can help me too.

-remember im a complete newbie at programming xD-
B
3
Posts: 21
Reputation: 619

Post » Fri Mar 15, 2013 3:09 pm

The code is in Javascript. It's also from what I can tell not orginized into game structures api. The result of the exported javascript code seems to be more like a direct minimalistic game. With a event sheet handler and layout handling.

Afterlooking at it. I find it's not worth it.

Anyways. To see the code. Export to HTML or CocoonJS. It's the runtime.js file you are looking for.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Fri Mar 15, 2013 3:29 pm

Ooh, okay, i found it, thank you!
-now i just need someone to reply my other question...xD-
B
3
Posts: 21
Reputation: 619

Post » Fri Mar 15, 2013 3:39 pm

Step by step:

- Download an Editor you prefer i recommend sublime text ore notepad++

- Export it with Html 5 (do not select minify script !!!!!!!!!)

- In the Export folder is a runtime.js open that with your editor

- This is your ~10 000 rows long code but well formated.

- Show this to someone who want help you but not got C2

- Watch him crying

- Ask your questions here in the forum


Sry but with C2 problems only C2 "coder" can help you. Its because C2 is Code free. localboss2013-03-15 15:46:04
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Fri Mar 15, 2013 4:01 pm

Whoah...i guess it wasnt a good idea...xD
Then i will have to wait for someone to reply my question, i guess...already almost a day, 0 replies...i dont know when i can bump the thread, but i guess i shoudlnt ask that here xD
thank you for the help anyways! :P
B
3
Posts: 21
Reputation: 619

Post » Fri Mar 15, 2013 5:12 pm

Even unobfuscated, Construct's code is dynamically generated. It is not designed to be human readable. Nevertheless, it is just Javascript and if you know JS, you shouldn't be having problems reading the code. But remember - there's a lot of code, as the engine is very advanced.
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Fri Mar 15, 2013 6:07 pm

[QUOTE=Zignide]... -remember im a complete newbie at programming xD-[/QUOTE]
@Zignide
Look, if you're a complete newbie, looking at the JavaScript code created is going to be of no help to you whatsoever. It'll just make your head spin trying to make sense of it.

What's the point? It won't make you a better Constructor. You'd be much much better off using your time in getting practice at using C2 to make games.

Really.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Fri Mar 15, 2013 7:15 pm

Construct 2 does not generate human-readable Javascript code after export. If you want to use Javascript in Construct 2, use the Javascript Plugin SDK.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Fri Mar 15, 2013 8:08 pm

Okay, then i just hope someone will reply the question i had...xD
Thank you all for the help! :)
B
3
Posts: 21
Reputation: 619

Post » Sat Mar 16, 2013 7:37 am

Well your post consisted of two questions.

1. where is the code
runtime.js after exporting.


2. Read the code
Here seems to be the the answer that's not being express well. The runtime.js is in pure English javascript code. It's as close to human visualization and readability as it can get. It's not in machine language, but in the language that some one with an editor would type out.

The difference being is that C2 write's the code in an effecient form that isn't meant to be read by humans. It's still the same language, but it's as note and abbreviated form. In a pattern that the browser can interpret.

That is the code created. There isn't anything else except for the source of exporter to js itself. Which is closed source.


B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Next

Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 20 guests