Asfianda / agk

Automatically exported from code.google.com/p/agk
0 stars 0 forks source link

Animation of larger sprites fails on Android #399

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Create various sized animation sprite sheets.  I made several one-row 5-frame 
sheets, with the frames being 100x100, 200x200, 300x300, etc.

Use the attached modified version of the SpriteAnim2 project.  I've also 
attached my test PNGs.  Change the file name in LoadImage() and the sprite size 
in SetSpriteAnimation() to test with each source image size.

What is the expected output? What do you see instead?

When run on PC, everything works great with all sizes of source sprite.  When 
compiled and broadcast to Android player 1.1.1075 (the latest from the My 
Products download), the 300x300 and larger sprites fail.  The Android player 
displays the entire sheet, and throws the "Image does not contain enough 
animation frames" error.

What version of the product are you using? On what operating system?

AGK 1.076 on Win7, Android AGK player 1.1.1075, Motorola Droid 2 Global running 
2.3.4

Original issue reported on code.google.com by lars.ke...@gmail.com on 13 Sep 2012 at 5:15

Attachments:

GoogleCodeExporter commented 9 years ago
I can confirm that sprite Animation fails when using image 300 on the broadcast.

Dennis

Original comment by dennis37...@gmail.com on 14 Sep 2012 at 4:29

GoogleCodeExporter commented 9 years ago
I just tested the equivalent using AddSpriteAnimationFrame and 300x300 and 
400x400 sequences of five frames work.  So that could imply that it's related 
to the large size of the original sprite sheet.

Original comment by lars.ke...@gmail.com on 14 Sep 2012 at 5:29

GoogleCodeExporter commented 9 years ago
I went ahead and compiled this short app to make sure there was not a problem 
with the Player. I uploaded the apk file so you can see for yourself. So there 
dose seam to be limitations on size of the animation sprite. After running the 
file just touch the screen it will end.

Dennis

Original comment by dennis37...@gmail.com on 16 Sep 2012 at 4:15

Attachments:

GoogleCodeExporter commented 9 years ago
Since the total width of the image is 1500 pixels and the max is currently 1024 
the image is being scaled down to 750x150 pixels when loaded. Then when you try 
to SetAnimation with the original frame sizes it finds the image isn't large 
enough. I may be able to make it handle this more gracefully.

Original comment by P.S.John...@gmail.com on 16 Oct 2012 at 10:58

GoogleCodeExporter commented 9 years ago

Original comment by P.S.John...@gmail.com on 18 Oct 2012 at 9:45