Jump to content

Ejecta / accelerated canvas libraries on android


dazld
 Share

Recommended Posts

Hey, I'm a js dev, mainly working on corporate stuff, but occasionally dipping into the world of animation, canvas, and yes, games. 

 

After coming across the Ejecta library for iOS, was wondering if people here had occasion to use it, and benchmark it against traditional HTML wrappers (phonegap, cordova etc) - and also, if there was something equivalent for android...? 

 

I did a totally unscientific comparison of canvas performance on various android handsets in a local phone shop (a good use of my lunch hour) and was super surprised to see that more recent phones did not necessarily have better canvas performance. I was expecting to see that custom builds of android were faster at rendering a simple animation, but in truth, it seemed that an old LG handset was actually the best of the bunch, in terms of framerate - yes it was running a custom android, but compared to things like an HTC One X+, it was significantly smoother. It's this kind of weirdness which would be nice to normalise with some kind of ejecta-like library, if one were existed. 

 

 

 

 

Link to comment
Share on other sites

I've not had a chance to play with Ejecta yet, but lets face it - it wouldn't have to do much to outperform PhoneGap :)

 

CocoonJS is the only other app compiler I know of that supports Android. But performance is supposed to be really quite neat, once it works.

Link to comment
Share on other sites

Intel XDK (which was AppMobi before) http://html5dev-software.intel.com/ supports iOS, Android and many more. I am planning to use it, as its license conditions are much cleaner than CocoonJS (and they don't require pop-up). Their only issue is several artificial permissions requested on Android platform. I am yet to test if my CreateJS-based game works ok there and if any framework adaptation is necessary.

 

Technically they work like CocoonJS (I think they require you use different canvas class though). 

 

Also note https://github.com/phonegap/phonegap-plugin-fast-canvas phonegap plugin for Android. It did not work well for me. It is not a drop-in replacement of canvas. And the fact that you need to use BOTH custom canvas class AND custom image class, makes framework adaptation painful.

Link to comment
Share on other sites

Good news, everyone, btw. Fast Canvas plugin is blessed for Phone Gap Build: 

https://build.phonegap.com/plugins

 

Note: this is ANDROID ONLY thing. 

 

In short it means that you don't have to install full-blown PhoneGap/Cordova and platform SDKs on your box to build PhoneGap+Fast Canvas apps. Just upload ZIP with your slightly (heavlily :) ) re-written HTML app to https://build.phonegap.com and download an APK.

 

Still, your code is executed by the same good old phone gap. Which means:

- You have to explicitly use FastCanvas object, and FastCanvas.createImage() function to create any images. Be ready to adjust your framework for this. 

- JS code is still executed by WebView, performance there is not improved.

 

Good news though is that model looks simpler than Intel XDK/AppMobi. These guys in fact require you to keep separate JS for rendering and interface control (and execute them in separate VMs). 

 

In any case, one publisher wants http://www.html5gamedevs.com/topic/1045-rhino-rink/ ported to Android "as is". I'll keep you posted on the road that would work for me. 

Link to comment
Share on other sites

I am using CocoonJS. It's the only one that supports WebGL which is a huge win for me (plus fits really nicely with pixi.js).

 

My only concern with it is I don't know why it's free, or for how long. I have similar worries about GameClosure. I would love an option to pay (maybe to remove splash screen?) just so I know the library will be sticking around for a while ..

Link to comment
Share on other sites

It's also possible to mention Ejecta-X (https://github.com/3dseals/Ejecta-X) a attempt to port Ejecta on Android. Last time I tested it, the performances was looking good but the touch events was not working (kind of critical bug for a game :D). This issue seems to be fixed now. But even if I would love this project to be successful (Ejecta is an awesome and super simple to use canvas accelerator) this project doesn't seem to be updated often.

 

ps: In the same vein Rezoner did a very interesting article about porting html5 games natively on multiple plateforms: http://www.html5gamedevs.com/topic/1040-sharing-some-of-my-thoughts-after-porting-html5-game-to-native-android-pc-application/?hl=%2Bgame+%2Bnative+%2Bapplication

Link to comment
Share on other sites

  • 3 months later...

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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...