Jump to content

Can Phaser games be packaged to run as a standalone apps?


ChuckLeone
 Share

Recommended Posts

I'm looking for a solution that would allow me to develop games and apps in JavaScript/HTML5 and then either 1) wrap them in native Android code like a WebView or 2) compile the game with a service such as CocoonJS/PhoneGap/etc so that they can be published to the OUYA and Google Play stores. I'd eventually like to release them on iOS, Windows and any other app as well so keeping my base code universal is the most desirable method. 

 

Will games developed in Phaser.io run as standalone apps on android and mobile devices? Can the web server that phaser requires to run be included with the rest of the game's assets into a standalone package?

Link to comment
Share on other sites

A couple of things you should be aware of for CocoonJS and Ouya:

  • As of this writing, the difficulty of selling a CocoonJS-wrapped HTML5 project on the Ouya is very high. I got very close a couple of weeks ago and then learned that in-app purchases (IAP) don't work with the Ouya marketplace and CocoonJS. Until the 'choice' is in place, IAP is the only way to sell apps on the Ouya right now.
     
  • CocoonJS doesn't, as far as I've been told, plan to support the X.509 certificate decoding needed for Ouya's IAP API. In other words, we all have to either wait for the Ouya marketplace change in the 'coming weeks' or, if there is significant interest, work on a JavaScript solution. (I'm all for working on a JS solution, by the way, and have a headstart on some code even, but am in a wait-and-see mode with CocoonJS 2.0.)
     
  • Bonus: You didn't write you were going to use Phaser, but there are lots of problems with Phaser and CocoonJS 1.4.7 right now. We are all waiting to test things with CocoonJS 2.0 and see if anything has changed.
Will games developed in Phaser.io run as standalone apps on android and mobile devices?

 

Yes, they will. I've done significant testing using this way. When used with something to wrap them like PhoneGap or CocoonJS, that is.
 

Can the web server that phaser requires to run be included with the rest of the game's assets into a standalone package?

 

The way Cordova works -- that's the underlining technology behind PhoneGap and even CocoonJS -- is that it acts like a local server and a browser combined. Things like XHR are routed to the native system as file requests and it then renders the pages. CocoonJS (1.4.7) especially uses the native platform's API to render things for its WebView mode. So, that's Safari for iOS and Chrome for Android.

 

As mentioned above, you just ZIP up your files, send them to Ludei, and they e-mail you a link, usually, 15 - 20 minutes later with the compiled files for whatever system you picked.

 

However, for testing, you actually want to use their Compile Launcher. It's available on the iTunes store and GooglePlay store. This will allow you to test things yourself (which I highly recommend) instead of waiting on the 20+ minute e-mail with your changes each time.

Link to comment
Share on other sites

Yeah, but there are still some problems, unfortunately. When I was testing it yesterday, the first version I tried worked, so I reported that back to them. However, when I tried a new version after that, it didn't work anymore. (Changing the Android versions helps to install the Launcher, but the Ouya intent settings aren't there anymore sometimes -- it doesn't register as a valid 'app' on Ouya.)

 

As soon as this is cleared up, I'm going to post a guide on getting HTML5 projects running under CocoonJS on the Ouya. I started writing it last week and have all the screenshots -- the steps themselves haven't changed since February -- but am waiting till I know it will reliably run and show up correctly.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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