animations correct on mac version of simulator but not on windows

We’re having a weird problem with animations in an iOS game we’re developing.  On the Mac version of the simulator (running as an iPad Air), everything looks fine.  The same code, however, running in the Windows version of the simulator (under any device) blanks out several animations.  In the test, we have roughy ten animations and most are fine.  Three, however, don’t load and show a black box where the animation should appear.  Only in Windows.

Has anyone encountered anything like this?

The animations are of varying sizes, durations, etc.  There is nothing unique about the problem three.  There seems to be no connection with what animation is loaded first or whether there’s any layering going on.

No.  Never encountered this.  My guess is you’ve got one of the following issues:

  • drivers issue
  • textures too big
  • wrong encoding for images

Please give us all of the following information:

  • Version of Corona you are using (ex: latest daily build is 2017.3067)
  • Version of  Windows you are running.
  • Kind of machine you’re running Windows on.
  • Answer Yes or No:
  • If you answered “No” above what do you mean then when you say animation.
  • Dimension of trouble sprite sheets.
  • Extension of sprite sheets (only valid extension for this is PNG).
  • Tools you’re using to:
    • Create sprite sheet(s)
    • Create art.

Even better make a small sample that demonstrates this and distribute it as a zip file (should be easy to do) via a link here.

Taking off for a bit.  Will check back on this thread when I get back.  

Thanks for the reply.  Unfortunately I can’t give you a sample at the moment.

Yes, an animated sprite, instantiated as you described.  The trouble sheet pngs are 9520 x 1092, 13284 x 696 and 9835 x 969.  Adobe Illustrator for the art and sheets.  Tried both on 2992 build and the latest daily build.

It’s interesting that you ask about the dimensions of the sheets.  These three are the widest of the bunch.  Not by a ton, but the next largest size is around 7000 across (and that animation works fine).  The reason for the width is we couldn’t get a clean animation when the frames were stacked, so instead of stacking 12 frames, for instance, 4 x 4 x 4, we put all 12 across.  When stacked, no matter what we tried, a lower frame always caught a piece of the one above it (and yes, great care was taken to lay them all out).  With that said, obviously you’re supposed to be able to stack frames so there must be something we’re doing wrong.

I take it our very long sheets could be causing the problem?  If so, it’s stange that it’s only on the Window simulator, not the Mac.  (Haven’t tested on an iPad yet.)

Those sheets are too big.  Even if you can get them to run on some machines, they will not work universally.

It isn’t the fault of the simulator.  I’m guessing the machine your other user is running on is either a laptop or using integrated graphics.  In any case, the texture unit isn’t wide enough to load those textures (sheets).

Use these LIMITS as a rule of thumb for the maximum width / height of a texture (sheet) and you’ll be good to go:

  • High Performance PCs (PC == Mac or Windows Desktop or Laptop) ==>  16384 (16K)
  • Mid-to-Low Performance PCs (Older Macs, Most Laptops, or integrated graphics Chips) ==> 8192 (8K)
  • iPad Pro + Other High-end Tablets ==>  16384  (16K)
  • All other modern iOS devices (some are 16K, but we’re going for universal compatibility) ==> 8192 (16K)
  • Modern Android Devices ==>  8192 (16K)
  • All but the oldest mobile devices ==>  4096  (4K)
  • Absolutely guaranteed to work everywhere ==> 2048(2K)

I tell my clients to never make textures larger than 4096 x 4096 to hit 90+% of the market.

Thanks so much for your help and for the excellent guidelines.  Really appreciate it!

No.  Never encountered this.  My guess is you’ve got one of the following issues:

  • drivers issue
  • textures too big
  • wrong encoding for images

Please give us all of the following information:

  • Version of Corona you are using (ex: latest daily build is 2017.3067)
  • Version of  Windows you are running.
  • Kind of machine you’re running Windows on.
  • Answer Yes or No:
  • If you answered “No” above what do you mean then when you say animation.
  • Dimension of trouble sprite sheets.
  • Extension of sprite sheets (only valid extension for this is PNG).
  • Tools you’re using to:
    • Create sprite sheet(s)
    • Create art.

Even better make a small sample that demonstrates this and distribute it as a zip file (should be easy to do) via a link here.

Taking off for a bit.  Will check back on this thread when I get back.  

Thanks for the reply.  Unfortunately I can’t give you a sample at the moment.

Yes, an animated sprite, instantiated as you described.  The trouble sheet pngs are 9520 x 1092, 13284 x 696 and 9835 x 969.  Adobe Illustrator for the art and sheets.  Tried both on 2992 build and the latest daily build.

It’s interesting that you ask about the dimensions of the sheets.  These three are the widest of the bunch.  Not by a ton, but the next largest size is around 7000 across (and that animation works fine).  The reason for the width is we couldn’t get a clean animation when the frames were stacked, so instead of stacking 12 frames, for instance, 4 x 4 x 4, we put all 12 across.  When stacked, no matter what we tried, a lower frame always caught a piece of the one above it (and yes, great care was taken to lay them all out).  With that said, obviously you’re supposed to be able to stack frames so there must be something we’re doing wrong.

I take it our very long sheets could be causing the problem?  If so, it’s stange that it’s only on the Window simulator, not the Mac.  (Haven’t tested on an iPad yet.)

Those sheets are too big.  Even if you can get them to run on some machines, they will not work universally.

It isn’t the fault of the simulator.  I’m guessing the machine your other user is running on is either a laptop or using integrated graphics.  In any case, the texture unit isn’t wide enough to load those textures (sheets).

Use these LIMITS as a rule of thumb for the maximum width / height of a texture (sheet) and you’ll be good to go:

  • High Performance PCs (PC == Mac or Windows Desktop or Laptop) ==>  16384 (16K)
  • Mid-to-Low Performance PCs (Older Macs, Most Laptops, or integrated graphics Chips) ==> 8192 (8K)
  • iPad Pro + Other High-end Tablets ==>  16384  (16K)
  • All other modern iOS devices (some are 16K, but we’re going for universal compatibility) ==> 8192 (16K)
  • Modern Android Devices ==>  8192 (16K)
  • All but the oldest mobile devices ==>  4096  (4K)
  • Absolutely guaranteed to work everywhere ==> 2048(2K)

I tell my clients to never make textures larger than 4096 x 4096 to hit 90+% of the market.

Thanks so much for your help and for the excellent guidelines.  Really appreciate it!