Extending Construct 2 with Javascript

Discussion and feedback on Construct 2

Post » Thu Feb 10, 2011 5:08 am

just for clarification, this means that if one knows javascript, one can program around a lot of C2's current limitations?
Check out my VGM on my soundcloud page!
Video-Game Music: E.C.2151
B
7
S
2
G
2
Posts: 193
Reputation: 1,561

Post » Thu Feb 10, 2011 7:58 am

Basically.

Ash, I'm concerned about something I noticed while looking at the Keyboard plugin. Will plugins have to be independently created for each exporter? I noticed that jQuery is used for key events in the keyboard plugin.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Thu Feb 10, 2011 9:36 am

w3schools is a popular resource, but a LOT of their stuff is out of date and doesn't conform to compliance, theres a big Stackoverflow post about this. I would recommend seeking other resources. See this site: http://w3fools.com/
Image Image
Scirra Founder
B
124
S
37
G
25
Posts: 3,945
Reputation: 44,882

Post » Thu Feb 10, 2011 9:44 am

Wait, so we can write plugins with Javascript? This is amazing.

Will contribute, and will probably use this to eventually create some apps for my site :mrgreen:
B
2
S
2
G
3
Posts: 143
Reputation: 1,536

Post » Thu Feb 10, 2011 2:37 pm

Yeah a lot of experts don't have very good things to say about w3schools - I'd find somewhere else to learn Javascript.

@Arsonide: there's no way around it, you pretty much have to rewrite plugins for each exporter anyway, because there's no one programming language which is ideal for *every* platform. That's why writing an exporter is a lot of work - because it's actually an exporter, runtime, and entire library of plugins!
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Thu Feb 10, 2011 3:35 pm

its not too bad. Say you use Java as an exporter you could still use javascript(Rhino) as the scripting language in the exported java exporter. Have it interpret your plugin and all you have to do is generate the code. Its not the fastest way of doing it but highly doable. Basically its all javascript just like in the html5 files. But faster because if you made your own C++ exporter, use V8 for interpreter and there you go. Quick and dirty but it works ;)

EDIT: but dont interpret javascript in android exporter. That = bad performance

EDIT2: Will there be support for linux in future?
B
2
S
1
G
3
Posts: 49
Reputation: 1,098

Post » Thu Feb 10, 2011 3:50 pm

so since w3schools is not good, can somebody suggest better resources for learning javascript?
B
9
S
3
G
3
Posts: 366
Reputation: 2,301

Post » Thu Feb 10, 2011 4:03 pm

B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Feb 10, 2011 7:40 pm

Yes, the MDC (MDN?) is a great reference - if you're googling a query, adding mdc works well for good results.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Mon Feb 14, 2011 11:09 am

Plugin Dev Question -

Is it possible to show a user input value in the event editors text for a plugin?

I looked at the SDK tutorial thing and it says do it like {#} and it uses this like "<b>{1}</b> is 17?" but when i see it in the text it just shows as {1} in bold text. So basically if the user inputs a value of 20 i simply want it to show "20 is 17?" instead.

Right now i am thinking maybe this is just not added in yet just like expressions seem to be missing also because from the description it seems this is what that does?
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests