Jump to content

Low FPS on Game after loading assets


Rustam
 Share

Recommended Posts

Hello!

When I create empty project and load assets, fps = 60, ok.

After adding about 15 images to stage (game.add.image(0, 0, atlasKey, frameName)), fps jumps between 35 and 55. (All Images have: 208x208px, about 50KB, and keep in 1 xml atlas)

 

Please, help to solve this problem.

Thanks.

Link to comment
Share on other sites

Are you doing any animation with these images? 

Doesn't sound like a huge memory footprint, but you probably want to give more information about the machine you are testing on. 

208 * 208 * 15 * 4 (one byte for each colour value in a pixel and one more byte for alpha) is 649 KB

also if the framerate is dipping it suggests to me that either your are animating these images, or you are redrawing frames unnecessarily if nothing is changing.

Link to comment
Share on other sites

18 hours ago, iKest said:

Try CANVAS render mode instead AUTO

In canvas mode I have this error:

Uncaught TypeError: Cannot read property 'save' of null
  c.StateManager.render    
  c.Game.updateRender    
  c.Game.update    
  c.RequestAnimationFrame.updateRAF    
  window.requestAnimationFrame.forceSetTimeOut._onLoop    

 

14 hours ago, Freshly Squeezed Games LTD said:

Are you doing any animation with these images? 

Doesn't sound like a huge memory footprint, but you probably want to give more information about the machine you are testing on. 

208 * 208 * 15 * 4 (one byte for each colour value in a pixel and one more byte for alpha) is 649 KB

also if the framerate is dipping it suggests to me that either your are animating these images, or you are redrawing frames unnecessarily if nothing is changing.

I tested on Mac (Hackintosh)

CPU: 3,29 GHz Intel Core i3, 
RAM: 8 GB
Browser: Safari 9.0.3

I don't animate this images, and don't use tweens. I think, that this app redraw frames unnecessarily, too. And how I can decide this?

(Sorry for my bad english)

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...