LOADANIM and iPad limitations

Previous topic - Next topic

Millerszone

I have an animated image that has 21 frames and the size of each frame is 229x228.
So my png image strip is 4809x228. I believe the iPad has a limit of 2048x2048.

My question, is the iPad limit for the animated image strip(4809) or each frame?
Will I have to break it down to 3 lines?

I will be using LOADANIM, DRAWANIM and ANIMCOLL.

Is there a faster solution than using the above commands?

Thank you, Mike




Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Kitty Hello

each texture (SPRITE) can't be bigger than 2048 at any dimension. iPhone has 1024, which is a very good value for most compatibility with any hardware these days.
So, the whole "image" ist limited to that - not just a single sprite. You can load the sprites seperately into unique slots to solve that. Beware, you're using quite a lot of memory there!

Millerszone

I think I can get by with half of the sprites, so I'll have 11 frames, width of the png file will be 2519.
The animated sprite is a swinging baseball bat and has a transparent background.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Kitty Hello

2519 is too big.
can you post a thumbnail of what you try to achieve?

ampos

Quote from: KidNovak on 2010-Oct-19
I have an animated image that has 21 frames and the size of each frame is 229x228.
So my png image strip is 4809x228. I believe the iPad has a limit of 2048x2048.

You dont need to do a anim-picture in line. You can do it in a square...

21 frames at 229x278 = 3x7 = (229x3)x(278x7)=687x1946

Almost fits  :noggin:

Ian Price

Can you not load the images in, one at a time and then use something like the following to display them -

Code (glbasic) Select

FOR n=1 TO 11
LOADSPRITE "GFX/XXX.PNG",n
NEXT

...

anim=1

WHILE TRUE

INC dlay

IF dlay>5
  INC ANIM
  dlay=0
ENDIF

DRAWSPRITE anim,x,y

SHOWSCREEN

WEND


I came. I saw. I played.

Millerszone

Thanks,

Sorry Gernot, I misunderstood you, I thought each frames couldn't be bigger than 1024 or2048.
So, I'll convert my image to: 21 frames at 229x228 = 3x7 = (229x3)x(228x7)=687x1596

Also, while testing the app on windows, it would randomly crash when object(ball) would hit the
bat(this is the big file I was using 2519 wide) using the ANIMCOLL command.
So most likely the large bat file was causing the crash.
I'll try it later today.

Thanks for the replies.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Millerszone

I couldn't wait for later. changed the file to 916x684 3 lines 229x228 decreased to 11 frames.

Seems to be O.K., no more crashes.

Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

matchy

It's not clear of the desire result. So there's no reason (or at least efficiency) to have stored images that are greater than 512x512 for whatever reason. The larger the texture (2D or 3D), the slower the render. It's better to stitch than to break, especially on iPad. ;)