Why HTML5, and the future of exporters

Discussion and feedback on Construct 2

Post » Fri Mar 09, 2012 1:36 am

@ Fimbul I like the idea of Construct2 having its own programming language as well, but i don't think it was meant to be used that way.
Posts: 67
Reputation: 5,114

Post » Fri Mar 09, 2012 2:08 am

The plugin-making language is javascript!

[QUOTE=Fimbul]With all plugins written in such language, even if it were to be a custom language developed by Scirra, a tool could be created to convert said plugins to the native language of the exporter, maintaining the plugins compatible across runtimes.[/QUOTE]
All official plugins and behaviors are written in Javascript, just like all the third party ones, using exactly the same SDK. This means we could in theory port them with the V8 javascript engine - but that doesn't run standalone on some platforms like iOS, where the only way to run javascript is in a browser. On top of that V8 is a "pure" javascript engine with no features like rendering, audio, HTML, form controls etc. and many existing plugins and behaviors have dependencies on there being an actual browser there with those features. So it would still be difficult to port.

Doubtless browsers will get better on all platforms over time, and the situation will get better.

TBH rewriting everything to another language in any capacity is off the cards - for the time being at least - there's no way we could possibly pull it off. However, there are lots of other good ideas here like a central plugin service which we've also been thinking about ourselves. Hopefully we can come up with things like that in feature to resolve some of the other pain points.
Scirra Founder
Posts: 25,089
Reputation: 199,786

Post » Fri Mar 09, 2012 10:33 am

To add to what Ashley is saying, there's a solution, while still using Javascript for the plugins.
The core framework can be C/C++ (and let's be honest, C/C++ can be compiled and run everywhere). The core framework can also embed the V8 JS engine. V8 is the fastest of the three vendors' engines. It's not even using full JIT, its compiling to native on the first pass (if I remember the numbers right, it's something like 1 mb of code in 200 ms).
Since all successfull game framework is using a scripting language, let it be JS !
And for the "restrictions" on iOS, there's no problem with that. The author of ImpactJS is already doing that. If you are building JavascriptCore from the Webkit sources (meaning V8 + various bindings), you can embed it in your iOS app, and go to the AppStore.
In fact, Apple doesn't want to have an other engine. You can grab the sources of Webkit, of JavascriptCore, and do your own build (but only those, so no Gecko/FF on iOS, and no Rhino/Squirell extreme...)
Posts: 708
Reputation: 6,704


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 34 guests