gamedevisfun

Deploying games to Android.

Recommended Posts

Hi Guys, I'm new to html 5 game development but not new to programming, I picked phaser over other tools such as unity because I like to code more than fighting with the UI for making simple 2d games. 

When it came to deployment to Android, the performance was terrible. I wrapped it using plain Cordova(not cocoon or phone gap) I understand that the game will then use WebView provided by the phone, so that means the performance will vary across devices. 

On my note 4, the game worked fine but on my s3 it was terribly slow. I searched everywhere on the web on how to deploy html5 games to Android and people have been suggesting either phone gap(performance sucks on this) or Cocoon.io which basically packages WebView+ or Canvas+ which are suppose to improve performance and is developed specifically for games but requires payment for apps more than 50mb. 

Does that mean we are stuck using Cocoon.io if the games I develop are more than 50mb and I want them to perform reasonably well? 

All I wanted was to develop couple of small games and ship them on Android to test the waters and not have to pay for it. Unity is free until the 100k revenue mark and now I'm thinking of moving to Unity just because it makes deployment slightly better than deploying html5/js games.

Also I'm not sure about  Cocoon.io'sfuture, if for some reason they decide to pull the plug on it, then that would be just terrible for developers who are using html5/js to develop games. 

In short - Are we stuck using Cocoon.io if we want our games to perform well?

Thanks and I apologize if it sounded like a rant, I'm just frustrated because of this whole deployment issue.

Share this post


Link to post
Share on other sites

No, you can continue to use Cordova, checkout Crosswalk which replaces various bits of the browser env to give you performance boosts at a hit to package size (about 25mb I think, might be wrong).

I'm not exactly sure on the specifics (a quick google will confirm) but I don't think Crosswalk is required for newer Android devices as all modern ones are various powerful and run a decent enough version of Chrome in a webview that you shouldn't have too many issues. You can conditionally (somehow, I dont know how, but I think its relatively trivial) package older devices (it'll be against Android version) with Crosswalk and leave newer ones alone.

Share this post


Link to post
Share on other sites

I crossed this same road around a year ago when I was looking at the best, most optimized, way to port my Construct 2 game to mobile. My initial and primary choice was Intel XDK, but a week after I began learning how to port with it, I learned the service would soon be discontinued altogether. Distressed, I looked at other options. After checking out PhoneGap and being too inexperienced to use Cordova CLI, I went with what seemed like the last option, Cocoon. At first, I didn't really think it was too great. The native Atomic plugins are a bit out of date, and some of the other features are annoying, like not being able to play your own music over a Cocoon compiled app, but Canvas+ really is pretty amazing. In my experience, it's the best way to know how your game will run/look on all devices, and I really like that assurance. As for the future of Cocoon, they have a new version in beta testing right now! with HTML5 development increasing and Intel XDK shutting down, I see a bright future for them. I just released my first game to open beta today using Cocoon, in fact!

 

Cheers

Share this post


Link to post
Share on other sites

The retirement of Intel XDK is a real shame - it worked and had big obvious buttons.  I'd used it for many commercial projects (all still live) and considered that Intel would be in it for the long haul.

It's closure is a reminder that any cloud based services can be here today, gone tomorrow.  Stay backed-up, flexible, portable, non-proprietary!

Share this post


Link to post
Share on other sites

Cordova + crosswalk works fine.

Starting from Android 6, crosswalk is no longer needed for most games, as the android web view is enough.

You can use crosswalk always or, as suggested before, create multiple apks.

For that you may see this link to help you: http://iwearshorts.com/blog/uploading-multiple-apks-to-the-play-store-from-cordova/

I haven't tried, for my game I always use crosswalk. The main reason for that was when I launched the game Android 6.0 was getting out, almost nobody had it, and I didn't had a way to test the game in those devices. So for not taking risks, crosswalk for all.

Share this post


Link to post
Share on other sites

Thanks for the input guys. Another thing I didn't like about cocoon is that you'd have to pay for splash screen too on top of 50mb limit. 

I tried crosswalk as well, I couldn't get it to work. I'll give it another try tonight.

Also, I've read somewhere that crosswalk is no longer supported anymore since it has "done its job", so I'm not too sure about it. I guess for older than 6.0 devices, we can use crosswalk and for newer just plain Cordova wrapper. 

Share this post


Link to post
Share on other sites

Check carefully on assumptions about Android devices (new ones I think are all fine), we made the assumption that the version of Chrome used in the webview would match that of the device, we were wrong, some devices use an older version of Chrome. I'm sorry I don't have exact version numbers for you, but I know it wasn't an issue with newer versions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.