is it possible to watch the code inside construct

Chat about anything not covered in these forums, but keep it civil!

Post » Wed Jul 10, 2013 6:16 pm

Hello,

I really like Construct 2!

One thing I can't seem to do is to see the code beeing made.

Is there anything I have missed, it would be nice to see the code and to be able to write some own code.

Maybe there is some kind of plug-in that could do that for me?

Does anyone know?

Thank You
Regards
Viking Jonsson
B
3
Posts: 1
Reputation: 177

Post » Thu Jul 11, 2013 8:00 am

You can't see the code (well, you can try to read the javascript output but good luck with that)

Because the philosophy of Construct 2 is to not have to write down code, the events are enough. It has always been like that If I don't make mistake, and I assume will always be.

You can try the browser action "execute javascript" if you realy know what you are doing
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,436

Post » Thu Jul 11, 2013 9:17 am

This is a common misconception. Construct 2 doesn't generate code. It generates data representing the events, then interprets that.
Scirra Founder
B
378
S
220
G
84
Posts: 23,871
Reputation: 188,157

Post » Thu Jul 11, 2013 1:54 pm

Like Ashley said, C2 doesn't generate code. Events will call the code, but its already written and included in runtime.
What you may want to look at is the code of the different plugins and behaviors. They are in the folder "Exporter/HTML5" of Construct 2 and are included in each project you use them in. The runtime.js will be the file that runs during game, and you can look at how every function is implemented in the plugins. The system object and all its functions/expressions/actions/conditions is also present in the exporter.

Once you have looked at it, just understand that C2runtime will every tick evaluate available events, trigger the ones that meet their conditions, and redraw if needed.

If you want, you can also write your own code in plugins/behaviors. Look at the javascript SDK in that case, and the plugin forum.
B
17
S
8
G
4
Posts: 461
Reputation: 6,077


Return to Open Topic

Who is online

Users browsing this forum: Digital Beast, mercuryus, zenox98 and 1 guest