Rustam Posted February 26, 2016 Share Posted February 26, 2016 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 More sharing options...
iKest Posted February 26, 2016 Share Posted February 26, 2016 Try CANVAS render mode instead AUTO Link to comment Share on other sites More sharing options...
Freshly Squeezed Games LTD Posted February 26, 2016 Share Posted February 26, 2016 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. iKest 1 Link to comment Share on other sites More sharing options...
Rustam Posted February 27, 2016 Author Share Posted February 27, 2016 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 More sharing options...
iKest Posted February 27, 2016 Share Posted February 27, 2016 Need source code... Link to comment Share on other sites More sharing options...
Rustam Posted February 29, 2016 Author Share Posted February 29, 2016 I created simple code with ReqiureJS. Created view-clas, where I create my images. All images I keep in 1 Phaser.Group. Link to comment Share on other sites More sharing options...
Rustam Posted February 29, 2016 Author Share Posted February 29, 2016 Ok, on several (3 or more) first compiles, this behavior is repeated, but later fps is normally (55-60). Link to comment Share on other sites More sharing options...
Recommended Posts