darkraziel

Performance problems with Chrome on IOS and Android

Recommended Posts

I've been working on a few projects using Phaser lately and I just came with this strange problem.

 

My game has some very heavy logic and lots of animations so I thought that this was what was slowing it down in Chrome, but I've been running some tests and I came up with some weird problems.

 

I have a blank state where I create 80 sprites at the same time and apply a tween to them (set to yoyo and infinite repeat) and it works just fine. But if I add a background image the game slows down a lot, going from an average of 55fps to 15fps.

 

I also noticed that if I create my sprites from an atlas performance drops a lot too.

 

The background image is a .PNG with 640x960 resolution. The sprites I create are 70x70 and also .PNG

 

Any ideas on what could be happening? any more info I should provide? Thanks in advance for any help I get.

 

edit: I should also add that this works perfectly on Safari, it's just a problem with Chrome and I'm using CANVAS by default instead of WEBGL.

Share this post


Link to post
Share on other sites

OK I can confirm it happened in 2 devices.


Games ran fine in my smartphone, Google Android version 40. Updated to 41.0.2272.94 and games are running like crap now. There must be some bug with this version, maybe you can check if that's the version you're using in iOS.

Share this post


Link to post
Share on other sites

After a lot of testing I found out that real problem isn't the background image. For some reason if I create any object (sprite, bitmapText) that takes textures from an Atlas, performance drops from 60fps to 5fps.

 

I'm not really sure if this is a bug with Chrome's latest version so I'll just have to continue this project without taking Chrome+IOS into consideration for performance testing.

 

examples:

 

This makes fps drop to 5:

this.game.add.sprite(100,100,"ui_atlas_gameplay","block1.png");

This works perfectly:

this.game.add.sprite(100,100,"block1.png");

Share this post


Link to post
Share on other sites

It's a Chrome bug. I already opened an issue at the Chromium project one week ago.

It seems that it may be related to the use of big textures. They have moved it from Unconfirmed to Available, so it seems they are aware of the bug but not working on it yet.

There's also a bug affecting WebGL on many devices with Android 4.4... a bad time for HTML5 games under Android Chrome.

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.