C3 plugins backwards compatibility question.

Discussion and feedback on Construct 2

Post » Wed Mar 02, 2016 10:32 am

@Ashley

The C3 website says that it will be backwards compatible with C2. Does this extend to 3rd party plugins?

There are a couple of .js libs that i'd like to make as plugins but i'm not sure if it's worth the cost and effort of development if they won't work or have to be rewritten.

Can you please clarify, thanks.
B
43
S
23
G
21
Posts: 735
Reputation: 12,142

Post » Wed Mar 02, 2016 11:19 am

The C3 editor is being rewritten, and accordingly the edittime.js script will need to be changed. (This part was not well designed anyway and I think everyone would agree having more capabilities and a clearer API there would be useful.) However the runtime side should still work unmodified.
Scirra Founder
B
414
S
245
G
92
Posts: 25,188
Reputation: 200,287

Post » Wed Mar 02, 2016 11:24 am

So does this mean that if you attempted to load a .capx in C3 with a C2 3rd party plugin that it would not load, or it would load but you wouldn't be able to edit the events?
B
43
S
23
G
21
Posts: 735
Reputation: 12,142

Post » Thu Mar 03, 2016 11:53 am

probably plugins will need an update.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 630
Reputation: 9,465

Post » Tue Apr 03, 2018 4:24 pm

After just buying my C3 license and trying to load in an existing product, I just discovered this MAJOR issue.

I have a JSON plugin that is core to my project and; as the JSON plugin is no longer supported, I'll never have it in C3 flavour. This of course means my project cannot be imported into C3.

Not only that, but there doesn't seem to be any JSON plugins for C3 available. In fact, the C3 plugins page is extremely sparse even a year after it's initial release. Personally, there are some 3rd party plugin functionalities that are essential (such as the JSON one) and I'm gutted that C3 cant load them. :(

Does anyone know any work arounds apart from just going back to C2?

Cheers
B
6
S
1
Posts: 43
Reputation: 640

Post » Tue Apr 03, 2018 6:32 pm

@Grimmy
You can do it with the browser plugin's execjs action and expression. The only learning curve is dealing with quotation marks ("). You'll want to use single quotes instead ('), or use "" when you want to use a " in Construct expressions.

Anyways here's an example:
https://www.dropbox.com/s/uhxb4e6eoypih ... .capx?dl=1

There really is no reason to use a json plugin, other than error catching i suppose.
B
100
S
38
G
134
Posts: 5,550
Reputation: 85,313

Post » Tue Apr 03, 2018 7:46 pm

What @R0J0hound said. If you really need a plugin, Rex comes to your rescue:

plugin
https://github.com/rexrainbow/C3Plugins ... s/rex_hash

docs
https://rexrainbow.github.io/C2RexDoc/c ... _hash.html
Image
B
34
S
11
G
3
Posts: 191
Reputation: 3,678

Post » Tue Apr 03, 2018 11:05 pm

You can do it with the browser plugin's execjs action and expression. The only learning curve is dealing with quotation marks ("). You'll want to use single quotes instead ('), or use "" when you want to use a " in Construct expressions.


This is all great. Thank rou. In your example I don't quite understand where you declare your 'myVar' variable though. Is this declared in an external .js file or something?

Thanks for taking the trouble!
B
6
S
1
Posts: 43
Reputation: 640

Post » Wed Apr 04, 2018 2:05 am

It’s declared in the first start of layout. “global” is the global object and we add myvar to it by assigning something to with global.myvar=. After that you can just use myvar instead of global.myvar.
B
100
S
38
G
134
Posts: 5,550
Reputation: 85,313

Post » Wed Apr 04, 2018 2:35 pm

Hmm, not sure this will work because I'm receiving my data directly from an AJAX request. It looks like s you are defining your JSON within the app itself. I cant figure this one out. (?)
B
6
S
1
Posts: 43
Reputation: 640

Next

Return to Construct 2 General

Who is online

Users browsing this forum: agg1401 and 3 guests