Jump to content

Help me to learn to use CocoonJs, Electra and Phonegap


plicatibu
 Share

Recommended Posts

Currently I'm building my games using Haxe / Openfl because I can target Flash, Android, Blackberry adn HTML5 with just one code base.

 

Unfortunatelly despite the fact that Haxe is a marvelous programming language and that Openfl is a great project, I'm having many problems using Haxe so I'm thinking to develop 2 versions of the game: one of them using Haxe / Openfl just for Flash and another version made in HTML5 (with Phaser).

 

Could you please kindly point me tutorials that teach us how to package HTML5 games as native applications (using Cocoonjs, Phonegap, Electra)?

 

I'd appreciate if one could point me tutorials that show not only the integration itself, but how to call native functions (for instace, calling Flurry libray / AdMob libray on Android).

 

Thank you all.

Link to comment
Share on other sites

I've no experience with CocoonJS or Ejecta. But I'm using Phonegap (Cordova) frequently. A good starting point for Cordova is the official documentation.

 

You have some plugins for Cordova, like AdMob. Plugins come in at least two parts. The first part is the native side (iOS, Android, etc) were you have to use Cordova's interface (see docs). The second part is the JavaScript mapping were you call the native side of your application.

 

For loading AdMob ads you just have to call something like:

function onAdMobCreate() {   window.admob.showAd();}window.admob.createBannerView('admobid', {testing: false}, onAdMobCreate);

But it really depends on the plugin.

Link to comment
Share on other sites

  • 2 weeks later...

I've no experience with CocoonJS or Ejecta. But I'm using Phonegap (Cordova) frequently. A good starting point for Cordova is the official documentation.

 

Slightly off topic question: Do you use the Phonegap Build service, or can you do without it?

I know the Build service is free for open source projects, and up to one private repo, and costs money after that. What I don't understand is if it's possible to build the apps yourself with Phonegap, or if only Phonegap Build is capable of that.

Link to comment
Share on other sites

  • 1 month later...

I am currently looking into Phonegap (and development using Phaser.js) as well. What I can say is, that there are a bunch of SDKs and stuff you have to install to build apps on your Windows computer.

 

As far as I remember to build for Android you need:

Apache Cordova

Phonegap

JDK, JRE

Apache Ant

NodeJS

Android SDK

 

+ there are some not so obvious installation and execution steps, like modifying environmental PATHs and creating Phonegap folders and Android apks by command line.

 

But at least everything is well documented. :)

 

Btw.: Does anybody know, if I use the free cloud service of Phonegap, can I use that application commercially? And can I delete it afterwards, and use another application?

Link to comment
Share on other sites

  • 2 weeks later...

I found the Intel XDK on the web: http://software.intel.com/de-de/html5/tools

It is an integrated development environment and build service for HTML/CSS/JavaScript to native applications. 

 

I made a quick installation and test, and it has been easy. Also it looks, that it supports Intel Crosswalk out of the box, which gave me a performance boost on Android 4.4 (KitKat).

 

The build process is handled in the cloud, so you have to register.

But I am impressed how easy it is to get the first application up and running.

 

I make some more tests this week, if anybody is interested I will share.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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