Source Code

Just started using Construct 2? Post your questions here

Post » Tue Jun 10, 2014 9:26 am

Hi,someone wants to buy source code of my game.How do I get the source code from the game created by Construct 2?
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Jun 10, 2014 9:39 am

There isn't really any source code.

If you export as HTML without using minify, you can see a slightly more readable version of the JavaScript that C2 produces, but it isn't really editable.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,486
Reputation: 59,758

Post » Tue Jun 10, 2014 1:05 pm

The source code is the .capx file.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Tue Jun 10, 2014 1:11 pm

is it necessary to have Construct 2 to read source code in .capx?
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Jun 10, 2014 1:33 pm

Yes. A .capx is is basically a zipped file that includes all media and a bunch of XML files that the C2 engine reads and processes to create the game. Without C2, the file is meaningless.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,486
Reputation: 59,758

Post » Tue Jun 10, 2014 1:40 pm

what if the person who wish to buy source code doesnt have C2?
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Jun 10, 2014 10:08 pm

Than they would have to buy a C2 license as well. Other than that, they *could* buy the source code. However that is like buying a psd photo and not having photoshop, useless. If they buy the source code, than they should be able to buy C2 as well.
B
28
S
5
G
5
Posts: 98
Reputation: 4,804

Post » Wed Jun 11, 2014 6:43 am

I'm not sure if it's still the case (easy to test though) but it used to be the case that the free version could open any .capx, even those that went past the free limitations, but it wasn't able to alter or save it. So basically the free version could be used as a viewer.

Disclaimer: It is entirely feasible that I am in error regarding the preceding paragraph, so as Eq80 has stated above, the only guaranteed way of seeing and editing the source is to purchase a licensed copy of C2.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,486
Reputation: 59,758

Post » Wed Jun 11, 2014 2:45 pm

Ah, well I'm not sure about that. They might be able to view it, it sounds pretty possible.

C2 is probably the only engine I've actually paid for within the first week, so I've always had a license.

We'll just have to see :)
B
28
S
5
G
5
Posts: 98
Reputation: 4,804

Post » Wed Jun 11, 2014 8:56 pm

The free edition can open any .capx, but if it exceeds the free limits it shows a warning and you won't be able to edit or export it.

Many users are worried about reverse-engineering, so the exported Javascript code is deliberately obfuscated and difficult to work with. There is very little you can usefully do with the exported code. Someone asking for source code likely wants to be in control of making substantial modifications if need be, so the exported code likely won't satisfy that, but the source .capx will.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests