I’ve created a single sprite sheet for my game app, with each frame 100×100 px.
Everything’s been working well until after I added a few more rows to the sprite sheet, then suddenly nothing gets drawn onto the screen any more. I reverted the sprite sheet back to an earlier version, which had less rows, and everything works again.
The sprite that works is 400w*900h px, and the one that stopped working is 400w*1400h px… I suppose there’s a middle ground somewhere I just haven’t bothered to look for it.
My question is what is there a dimension limitation on the resource image files? And is there another way to get around what I just descripted other than splitting it into different files?
Thanks in advance
edit: getMaximumBitmapHeight() helped a little: On my testing device (nexus galaxy) it’s only 2000 something… And on the emulator is in the 30k range :S Is there a way to set the allowed size? And if anyone knows… how different is it from phone to phone
The Canvas class has a method getMaximumBitmapHeight() (& width , naturally ) to give you this information for a given device, you can just print it in a log message.
On possible work-around is adding columns. Your image is only 400px wide but 1400 in height. It could be that 1400 is too wide but I very much doubt 400px is too wide.