Jump to content

Simple Phaser game extremely slow with PhoneGap build


ashes999
 Share

Recommended Posts

I made a very simple game where you have a dragon flying on screen and collecting balloons.

 

You can play it here, courtesy of GitHub Pages. You can view the source on GitHub, but be aware that it's CoffeeScript. (If you want to see the raw Javascript, you can see it here.)

 

The game runs fairly quickly on my dev boxes in Chrome (tested in Linux VMs). It doesn't have much; maybe 10-15 sprites on screen at once, one text object, and some sine waves (yeah, I know, I couldn't resist).

 

I built it using PhoneGap's cloud build service (it's quick to set up). But it runs slow on Android. Really slow. Oozingly slow, like a few frames per second.

 

I'm not sure why. I checked it on my phone (Samsung Galaxy Discover -- circa 2012). I also checked it on BlueStacks, which should run lightning-fast on my desktop PC. It's still slow.

 

Any suggestions? Is it because I left the drawing mode in AUTO instead of CANVAS?

 

 

Link to comment
Share on other sites

I recently used the Intel XDK and performance was great. On par with cocoonjs. The trick was to build an Android Crosswalk app (A standard Android app was woeful).

Dunno about iOS but XDK can compile for it.

Edit: yeah I think you might want to use CANVAS not AUTO. I haven't done a lot of testing around this but I used CANVAS I think.

As an aside I've read that Intel is really pushing for html5

Link to comment
Share on other sites

While it's true that intel XDK rendering preformannces are similar to cocoonjs', from my experience on android, the sound support/management is total crap.

Playing multiple sounds turns to a catastrophe.

 

Anyway, your dragon game above, I can confirm it runs smoothly with chrome (on OSX), and very poorly with firefox.

 

Try using Phaser 2.0.7, I'm quite sure those slowdowns come from the latests versions, namely, 2.1.2 and 2.1.1, which run on a different version of pixi which triggers those slowdowns problems.

 

 

I'm 99% sure those slowdowns won't occure with 2.0.7.

Link to comment
Share on other sites

i have no problems with sound and crosswalk at all..   with cocoonjs the sound "jumps" on the first note..  with crosswalk i can play several long songs over each other and it works flawlessly..

 

 

 

one tip for crosswalk:  use WEBGL for crosswalk not canvas..  (with cocoonjs it is the other way around) - it will be faster

Link to comment
Share on other sites

  • 4 weeks 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...