Sign in to follow this  
GNUton

how to make a android app out of html5 one

Recommended Posts

Hi there,
I have started to develop a couple of phaser games that I would like to publish on android stores.
I have wrapped the html5 with phonegap, but there I faced a lot of issues,

1. No WebAudio [1]
2. No webgl [1]

I didn't t manage to use the phaser game.scale API to make the game area fit the full device screen too.

 

Could someone show me a very short and simple working example?
Moreover should I keep on using phonegap,or should I use something else?

Thanks

 

[1]    https://developers.google.com/chrome/mobile/docs/webview/overview#does_the_new_webview_have_feature_parity_with_chrome_for_android

Share this post


Link to post
Share on other sites

From my brief test with Phonegap it also has poor performance. There is a "steroids.js" out there that might help performance? Not sure

 

CocoonJS you might like to try. I'm currently playing around with their CocoonJS Launcher app. One warning about CocoonJS, when you use their cloud compilation service to package as an app, there is some legalese in there about you granting them the full rights to your code and game. I cant find it just now, but anyways have a close read....

 

My other thought was GameClosure. I havent looked into it in detail, but I believe you could you use that as a wrapper around any html5 game. (GameClosure is its own game dev api)

Share this post


Link to post
Share on other sites

Hi,

From what I got the problem looks to be temporary.

Bad perfor!Nance and missing audio is just an android problem which will be fixed in the coming releases.

A solution that I would like to try is to run the html5 app in a Qt5 webview.

That uses a different webkit\webview that hopefully draws on a gl surface.. And that's maybe what cocoonjs does.

I should give it a try.

Share this post


Link to post
Share on other sites

To sort of answer your original question, there is PhoneGap, as you mentioned, Cordova, which PhoneGap is based on, Ejecta, for those projects targeting only iOS, Titanium, which has its own set of APIs, Game Closure, CrossWalk, and, of course, CocoonJS (which I've personally spent a great deal of time working with and submitting patches to Phaser for over the last several weeks).

 

If you are just looking for WebGL, CocoonJS might not be what you want just now. There are a number of known issues with the current version, including some that pertain to basics like writing text in WebGL mode. (And it also doesn't have WebAudio either, by the way. At least, not in its 'accelerated' mode currently.)

 

Depending on how hardcore you want to go about it, you could even compile your own version of Chromium from its source. Many of these wrapper software projects are, at their root, variations of Chromium with additions or special hacks here and there. I do know some people are rolling their own versions now too.

Share this post


Link to post
Share on other sites

Hi and thanks for some many answer.

So let's evaluate the options...

CocoonJS is not a good options for me. Webgl is slow and the canvas doesn't t render text in my app (as u mentioned) even if u workaround these problems, in order to use it you have to allow them to reuse your source code and more.... Not nice! The audio worked for me BTW. Text didn't.

Phone gap a Cordova. Slow on android since we view is based on chromium. May viable in the future. Not fast at moment for games.

I'm now interested in crosswalk and game closure, I have not tried them out yet, do they have known issues?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.