[Resolved] cocos2d-html5 with Phonegap Build

Hi

Has someone tried to publish a game using cocos2d-html5 with Phonegap Build ?

Hi, Jose

There won’t be any problem to publish a cocos2d-html5 game with Phonegap, because we basically used only javascript to construct our engine. But you may meet some general problems with Phonegap, like detection of device orientation change, you need to transform some code from usage of HTML5 API to native Phonegap API.

Otherwise, you can also check out our JSB solution which permit you to publish your javascript game code with Cocos2d-x. This solution uses native code to run your game, so the performance will be much better. Though it may be more difficult to use than Phonegap’s simple package solution. All depends on your need

Huabin

Hi@Huabin,
I’m new in Cocos2d-html5, I have create a sample game in cocos2d-html5 and now want to run in android device but no idea how to create .apk file you are talking about
“JSB solution which permit you to publish your javascript game code with Cocos2d-x.”
can you explain it what is jsb and how to publish JavaScript code in cocos2d-x.

Hi,
maybe this will be useful for you:

HI, I’m YUYE

Here is my tutorial for “How to use phonegap adding origin Html Wights and WebSdk for cocos2d-x”

and I made a demo in github.

I hope it can help you

Jose Marin wrote:

Hi
>
Has someone tried to publish a game using cocos2d-html5 with Phonegap Build ?

and here is a Questionnaire survey : “what kind of tutorials do you want to learn?”

if you want to know more tutorials just let me know

Jose Marin wrote:

Hi
>
Has someone tried to publish a game using cocos2d-html5 with Phonegap Build ?

hi @YUYE,

thanks for shearing phonegap but did you know in Gaming it’s performance it down means it working slow in mobile game so did you have any other way which can improve mobile gameing speed… like native speed…

Hi @Raw, you could have a try with Cocos2d JSB. The performance is closed to native.

@Shun
Thanks, But I didn’t have any idea about Cocos2d JSB. so can you explain it…

Here are some video tutorials on JSB

Huabin LING wrote:

Hi,
maybe this will be useful for you:
http://www.youtube.com/playlist?list=PLRtjMdoYXLf7Dr6Tp22eJoqt1Ha2k17ck

Hi all,

So I wanted to plunge into cross platform production (albeit an unfinished game) to make sure I can have a working app by my scheduled date. I’ve attempted the following method because it just looks so easy: http://www.raywenderlich.com/32970/how-to-make-a-cross-platform-game-with-cocos2d-javascript-tutorial-getting-started

All i got was a black screen with initial error message on XCode: cc.Color4B is not a constructor -_-

  1. Is the method advised in the aforementioned link still appropriate?

  2. Or do I look closely at JSB with cocos2d-x? Is it easy to port from HTML5 codes to cocos2d-X variant?

  3. Would I get close to native performance with Google Chrome Packaged App? Apparently it takes on phonegap. Not too sure.

Please advise. Don’t want my 2 months game to go down the drain :frowning:

Decki