lpbr Posted February 23, 2018 Share Posted February 23, 2018 Hi, I have a sprite sheet with 9694 pixels width that I can NOT make it narrower because it has 74 frames with 131 pixels each. However it is blowing WebGL (see snapshot with the error attached)... How could I solve this issue? Link to comment Share on other sites More sharing options...
AndreasLoew Posted February 23, 2018 Share Posted February 23, 2018 Sounds like you won't be able to pack them all in one sheet. You make the sprite sheet 2048x2048 max. if you want to be able to open it on mobile devices. You might be able to pack as many as possible with TexturePacker. - Use "Multipack" to pack multiple sheets at once. - Enable trimming if the sprites have transparency You won't get a strip but tightly packed sheets. Don't worry about the sprite position - Phaser can read the data files that TexturePacker creates and knows here to find the sprites. lpbr 1 Link to comment Share on other sites More sharing options...
lpbr Posted February 23, 2018 Author Share Posted February 23, 2018 Thanks, I will check this out. Now I am running into another issue that may be related to. Since I didn't know about TexturePacker I had the "ingenuous" idea (LoL!) of chop my sprite sheet into two different halves (first half of frames on one and the second half of frames on another). Basically I made two animations and used onLoop event of the first one to trigger the second, I think you got the picture. Ok, it worked on my computer but then when I tried on an actual mobile (my Samsung J2) I just got a big black screen. Not nice. Anyway when I commented the lines of code that added the animations to the stage the code worked, so I am sure that the problem is there. After you mention the TexturePacker I am almost sure that this approach (using too wide sprite sheets) may be a real problem maker. Anyway, back to the square one. Let's check the TexturePacker stuff! Link to comment Share on other sites More sharing options...
Recommended Posts