[Suggestion] Exporting to Cocos2d+JS

Discussion and feedback on Construct 2

Post » Mon Nov 12, 2012 1:25 pm

I noticed that Cocos2d (a mobile, native engine) has a Javascript binding:

https://github.com/cocos2d/cocos2d-iphone/wiki/cocos2d-and-JavaScript

I was thinking that maybe, instead of accelerating the mobile games at the low Canvas calls level like AppMobi probably does, Scirra could create a special Cocos2D based runtime that would accelerate at the entity level (sprites, backdrops).

My guess is that the Cocos2d JS bindings would allow most of the JavaScript in the runtime and the plugins and behaviors to "just work". any Input or sound related javascript would have to be specially handled at the C2 runtime level, but I guess that is also a requirement in DirectCanvas. Any custom plugin or behavior that relies on canvas or webgl calls would also have to be converted, but I think that is a small percentage of the user-created plugins.

I understand that such an exporter would not have all of the plugins and behaviors of the HTML5 engine, but neither does DirectCanvas and I would think that the Cocos2d exported games would perform faster than the DirectCanvas.

What do you all think?juantar2012-11-12 13:34:46
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Mon Nov 12, 2012 3:29 pm

DirectCanvas and CocoonJS both effectively do this already. There's no reason Cocos2d would be faster. What's to be gained by using Cocos2d?Ashley2012-11-12 15:29:32
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Nov 12, 2012 3:59 pm

Mainly performance. The link says that the Cocos2d approach could be faster than DirectCanvas, but again they don't show any numbers so they could be just making that up.
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Mon Nov 12, 2012 4:43 pm

It's an enormous amount of effort to go to for a non-guaranteed speedup (I don't see any benchmarks backing up their claim). To improve performance, the main thing we are looking for is WebGL support, which Cocos2d does not appear to support. So we will hold off writing any new engines unless we can get that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Sep 12, 2015 2:50 pm

Any possibilities after 3 years with so much improvements on Cocos2d-X JS?

We needed to have native exporters if we wanted to make C2 a serious engine.
We've done a lot of cool projects with C2.
But, the problem with C2 is its performance on mobile, which is no way near to other engines.
B
8
S
2
Posts: 9
Reputation: 837

Post » Sat Sep 12, 2015 3:39 pm

Ashley's last post still remains true. There's no real indication that even a native exporter would speed up anything.
That being said, what if a native exporter was made, and it did not speed up your game?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767


Return to Construct 2 General

Who is online

Users browsing this forum: randomly and 13 guests