Cocos2D-JS Exporter?

Discussion and feedback on Construct 2

Post » Mon Oct 06, 2014 9:28 am

Hello there,

a question @Ashley:

According to the description on Cocos2d website:
" Cocos2d-Js supports running game code as native application in Cocos2d-x JavaScript Bindings without or with little modification" http://www.cocos2d-x.org/wiki/Cocos2d-JS.

"All graphics, rendering and physics code will run natively and only the game logic will run in JavaScript. Cocos2d-x uses SpiderMonkey, the Firefox JS virtual machine (VM), to execute JS code.

The JS VM is extended to support all the cocos2d, Chipmunk and CocosBuilder Reader APIs. So, when you create a CCSprite in JS, you are actually creating an C++ CCSprite. When you create an action in JS, you are actually creating an C++ action, when you create a particle system in JS, you are actually creating an C++ particle system… and so on. This approach is about 10x ~ 20x faster than HTML5 games even when they use accelerators like directCanvas" http://www.cocos2d-x.org/wiki/How_to_bind_C++_to_Javascript

This framework is opensource and has many games in their showcase, even zynga used it. Can it be used for development of "native" exporter for C2? Does it make sense technically?
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Mon Oct 06, 2014 12:12 pm

No, if it's not a real browser engine, not interested. Sounds like just another Javascript engine with cherry-picked features bolted on, which are compatibility nightmares (see: CocoonJS, Ejecta).

Cocos2d-Js supports running game code as native application in Cocos2d-x JavaScript Bindings without or with little modification

So they support a full browser-compatible DOM, Web Audio API, WebGL and WebRTC? Hmm, I doubt it if it's not a browser.

This approach is about 10x ~ 20x faster than HTML5 games even when they use accelerators like directCanvas

This is probably based on out of date measurements - directCanvas changed name quite some time ago :P - so it's probably no faster, and likely actually slower on iOS 8 since custom JS engines can't JIT compile.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,378

Post » Mon Oct 06, 2014 1:34 pm

I expected a slightly more positive response, but well, I can understand the situation because of any headache that cocoonjs already offered you @Ashley XD.
What surprised me was the amount of great games published through it, I came to see a Disney there.
I had the opportunity to test the platform some time ago, and complaints about performance I have none, it handles very well with that part.
Well, be that at least you could look at this a little deeper into @Ashley? Shall not be the first time that someone already asked about cocoos, but it would be cool to do that and give a verdict whether or not it's worth.
Do not misunderstand me, you gave a very complete answer, but some of them seem just guesses XD
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Mon Oct 06, 2014 2:14 pm

Even if we supported it, without a full DOM, Web Audio API, WebRTC etc. etc. it will be an ongoing compatibility nightmare. A big factor in dropping CocoonJS support was the perpetual support headache of users running in to those same missing features again and again. So no, if it is missing such major features, I don't want to support it.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,378

Post » Sat Feb 21, 2015 7:03 pm

I'm confused, Cocos2d-JS, developed by the team behind Cocos2d-x is a combination of "Cocos2d-HTML5", Cocos2d-Javascript and Cocos2d-JSB, sponsored by both Google and Zynga. The idea that this is some frankenstein creation is a bit presumptuous on your part. Cocos2d-JS is designed for developing web games as well as native desktop and mobile apps, which was the big interest in for both Google and Zynga. You can develop with Cocos2d-JS using nothing but a pure HTML5 project if you like, so I don't see how that is any different than what you are doing now.

If you want more proof that it is not a passing fad, the following game titles were developed with Cocos2d-x and JS:

Avengers Alliance by Marvel Entertainment
Star Wars: Tiny Death Star by LucasArts
Family Guy: The Quest for Stuff by TinyCo, Inc
Diamond Dash by Wooga
BADLANDS by Frogmind

Just because it has the letters JS on the end, everyone assumes it is some mashup, or as you say "cherry-picked features bolted on". Why don't you actual install and look at Cocos2d-JS before making an assumption. I purchased Construct 2, but have not used it since I have moved to Cocos2d-JS as you refuse to support it as an export option.
B
3
Posts: 1
Reputation: 177

Post » Sat Feb 21, 2015 7:31 pm

Ashley wrote:Even if we supported it, without a full DOM, Web Audio API, WebRTC etc. etc. it will be an ongoing compatibility nightmare. A big factor in dropping CocoonJS support was the perpetual support headache of users running in to those same missing features again and again. So no, if it is missing such major features, I don't want to support it.



With a quick glance in the wiki, I see it supports web audio when on web.
Does not look like it supports webrtc.

cocos2d wiki


Also, looking at the tool, ... perhaps the Cocos2d users can request Cocos2d for a decent importer of an exported html5 web app/game.
Sounds far more plausible then asking for a 3rd party to make their exports compatible with cocos2ds features/changes.

They support HTML5, I would have thought they would be able to import some.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sat Feb 21, 2015 10:21 pm

@jbardi
If you want it so badly, you could support your argument by doing some investigation as to what features actually port over.
Demanding gets you squat, proof gets you everything.
Image ImageImage
B
170
S
50
G
179
Posts: 8,380
Reputation: 113,429


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests