Jump to content

Test game code/assets for mobile devices


spinnerbox
 Share

Recommended Posts

Hello. I searched some of the project templates in Phaser Gituhub but it seems the assets/images are not available for download.

 

Can you please suggest me some link where can I find free to use finished Phaser game that I can convert into Cordova/Android mobile game just for testing purposes?

 

I already started something with cordova and managed to deploy emulator and working environment. But when I run my game I just see the background color of index.html file. I assume the game is out of viewport so I kind of need help to understand what is going on.

 

Also what docs/books can you refer me when speaking about Cordova/Phaser? There is nothing in the phaser docs.

Link to comment
Share on other sites

Hi spinnerbox,

 

Normally it'll just work out of the box if the game is made for mobile.

 

Phaser has a Device object that you may wanna look into, it allows you to know whether you are in a Cordova game or not (game.device.cordova).

 

If you wanna use Cordova plugins you have to listen for the "deviceready" event (you have to put that outside of your Phaser states) and initiate your plugins in there.

document.addEventListener('deviceready', function(){..});
Link to comment
Share on other sites

Is cordova backward compatible? For example I make something work in Cordova 4 and then use Cordova 5 tools to generate apk file?

Coz I see Intel XDK generates for Cordova 4 the best.

 

This XDK tool seems good. I could just import my HTML5 files and export for android :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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