Mike018 Posted July 16, 2016 Share Posted July 16, 2016 I've read about performance issues if you try and scale all your assets on the fly, but what about texture packer's scale option? I'm guessing it just scales the entire atlas before the game begins so there's no performance issues after the preload, is that correct? As of now I'm using different atlas's based on the pixel ratio. But if the pixel ratio is something like 1.5, then this solution wouldn't work. Any tips on the most performant way? if(window.devicePixelRatio >= 3) { this.game.load.atlasJSONHash('testAtlas2', 'testAtlas2.png', 'testAtlas2.json'); } else if(window.devicePixelRatio >= 2) { this.game.load.atlasJSONHash('testAtlas', 'testAtlas.png', 'testAtlas.json'); } Link to comment Share on other sites More sharing options...
drhayes Posted July 19, 2016 Share Posted July 19, 2016 Are you seeing measurable performance issues that you're trying to correct? Link to comment Share on other sites More sharing options...
Mike018 Posted July 19, 2016 Author Share Posted July 19, 2016 55 minutes ago, drhayes said: Are you seeing measurable performance issues that you're trying to correct? Nope, with the scale of the game I'm making now, anything would work without performance issues. I'm just wondering what the most performant way is since I'm focusing on mobile. I'm trying learn how to optimize everything while the scope of my project is small, so I don't run into too many problems in my future projects. Link to comment Share on other sites More sharing options...
Fatalist Posted July 19, 2016 Share Posted July 19, 2016 On 7/17/2016 at 0:23 AM, Mike018 said: But if the pixel ratio is something like 1.5, then this solution wouldn't work. You don't need to have different atlases for every resolution. For 1.5, load the one for 2, a little downscaling is not a problem. Link to comment Share on other sites More sharing options...
Recommended Posts