Author Topic: Cutscene Animation too long  (Read 1448 times)

Liaf

  • Member
  • **
  • Posts: 19
  • Karma: +0/-0
  • yay!
    • View Profile
Cutscene Animation too long
« on: Thu, Jun 17, 2010 »
I created a interactive Cutscene as a FlxSprite (for various reasons). But somehow it seems as if the png the animation is loaded from is just too long (About 40 frames, each with 640*480px). As soon as it reaches a certain point it just loads empty frames. The animation still plays and everything works fine, except it doesn't get displayed. I'm currently using the latest stable Flixel version and Flex SDK 3.
So my question now is, if that is a bug in Flex SDK 3, if it's just not possible because it's too long, or if there are some other ways to avoid this problem. I'm currently kind of stuck, because all of my game is building up on these cutscenes.

Here the code how I'm loading the Graphic
Code: [Select]
this.loadGraphic(cutscene2, true, false, 640, 480);
this.addAnimation("play", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], 10, false);

I guess there's no problem with that, since it works with an animation smaller than that (17 frames, 400*200px)

MRKSTWRT

  • Active Member
  • ***
  • Posts: 116
  • Karma: +0/-0
    • View Profile
Re: Cutscene Animation too long
« Reply #1 on: Thu, Jun 17, 2010 »
Flash has a limit for the size of a bitmap that it can load. I can't quite remember what it is at this moment but it sounds like your image exceeds that.

cai

  • Contributor
  • ****
  • Posts: 465
  • Karma: +0/-0
  • the illest of villains
    • View Profile
    • Brandon Cash
Re: Cutscene Animation too long
« Reply #2 on: Thu, Jun 17, 2010 »
In Flash Player 9, BitmapDatas could only be 2880x2880 pixels.  In Flash Player 10, this limit was upped to 4095x4095 pixels.  For FP10, you can also use 2048x8191 or 8191x2048.

However, I would strongly advise finding another way than using individual frames.  Obviously that's not possible in every scenario, however.
Follow me on Twitter | Come join us at #flixel on irc.freenode.net!

Liaf

  • Member
  • **
  • Posts: 19
  • Karma: +0/-0
  • yay!
    • View Profile
Re: Cutscene Animation too long
« Reply #3 on: Thu, Jun 17, 2010 »
Thanks for your replies, that really helped me. I think I'll use another way. But since I never did this, I'm just gonna try and ask: What would be a good way of making a cutscene (or something else like using a skill in an rpg) with flixel?
« Last Edit: Thu, Jun 17, 2010 by Liaf »

Richard Kain

  • Active Member
  • ***
  • Posts: 231
  • Karma: +0/-0
    • View Profile
Re: Cutscene Animation too long
« Reply #4 on: Thu, Jun 17, 2010 »
Your best bet is to construct your cut-scenes using the in-game graphics and engine. (as opposed to a full-on animation) This will limit you considerably on what can be presented, but there are plenty of techniques you could use to compensate for those limitations.

At the moment, the only way to do a full-on full-screen "animation" in Flixel is the method you've already attempted. You were going about it the right way, it just required far too many frames.

If your intro cut-scene is more along the "slide show" approach, you can always just divide your slides up into different images, or at the very least small enough images.

Rybar

  • Contributor
  • ****
  • Posts: 279
  • Karma: +0/-0
    • View Profile
Re: Cutscene Animation too long
« Reply #5 on: Thu, Jun 17, 2010 »
You should probably find a more efficient way to do your cutscenes, but you can also make your frames fit inside flash's size limit if you used a sheet instead of a strip. 6 frames wide x 8 frames tall still fits inside 4096x4096.

Garmichael

  • Member
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: Cutscene Animation too long
« Reply #6 on: Thu, Jun 17, 2010 »
I got a couple questions semi-related to this topic...

1) If FP10 supports larger images than FP9 and I compile using an image that FP10 supports, if someone else plays on FP9, will it not work for them?

2) Does a tile sheet of 5x5 load/run faster than a tile sheet of 25x1?

ashitaka

  • Guest
Re: Cutscene Animation too long
« Reply #7 on: Thu, Jun 17, 2010 »
1) If FP10 supports larger images than FP9 and I compile using an image that FP10 supports, if someone else plays on FP9, will it not work for them?
the swf wont work for fp9 at all when compiled for fp10
2) Does a tile sheet of 5x5 load/run faster than a tile sheet of 25x1?
dont think so

KillaGouge

  • Guest
Re: Cutscene Animation too long
« Reply #8 on: Fri, Jun 18, 2010 »
as far as the 5x5 or the 25x1, it won't have any effect on performance as the total number of pixels in the image doesn't change.