mattbrand Posted January 23, 2017 Share Posted January 23, 2017 Is there a maximum image width or height for images imported with game.load.image on mobile? I have a sprite sheet that is 3080 pixels wide, and I think it may be the culprit of an error that is happening. Link to comment Share on other sites More sharing options...
phreaknation Posted January 23, 2017 Share Posted January 23, 2017 What kind of error are you getting? Link to comment Share on other sites More sharing options...
mattbrand Posted January 23, 2017 Author Share Posted January 23, 2017 "WebGL: INVALID_VALUE: texImage2D: width or height out of range" I'm actually creating a texture atlas with all the frames now, as I learned that spritesheets are not very efficient. Link to comment Share on other sites More sharing options...
scheffgames Posted January 23, 2017 Share Posted January 23, 2017 The safest bet would be to limit yourself to 2048x2048 max texture size - some newer devices will support 4096x4096 max texture size but better safe than sorry. By the way, what spritesheet packer are you using? I'm using a Photoshop script called spritesheet packer (you can download it and watch a short tut here ) and it allows me to play with rows and columns settings thus limiting the final size whithin 2048x2048. Link to comment Share on other sites More sharing options...
mattbrand Posted January 23, 2017 Author Share Posted January 23, 2017 OK that's great advice, thank you. I have a license for TexturePacker, which works really well. It has a default template for Phaser. Link to comment Share on other sites More sharing options...
phreaknation Posted January 24, 2017 Share Posted January 24, 2017 yeah I would reduce the size as you can not promise the memory capacity of every and all devices Link to comment Share on other sites More sharing options...
Recommended Posts