3
votes

I'm making a fighting game, so I have giant character sprites (300px X 350px) with lots of frames of animation (~150 per character), so the maximum 2048 x 2048 texture size won't fit all frames of animation for a character. So, I'll need multiple TextureAtlases, right?

Do I need to worry about the costly GPU texture swapping, then, if I'm switching TextureAtlases on a MovieClip?

To change animation frames, would it be sensible to create a manager to select the frame and the atlas?

Or can I combine TextureAtlases so that one atlas stores multiple 2048 x 2048 sprite sheets?

How would you approach this?

4

4 Answers

4
votes

A recommendation from Daniel Sperl on the Starling forum:

If you're sprites are so huge, I'm afraid you'll run into problems with texture memory. Unfortunately, there is no easy workaround for that at the moment, except creating that animation with "Spriter" (beta):

http://www.kickstarter.com/projects/539087245/spriter

1
votes

Consider whether you can reduce your animation demands by doing skeletal animation. Instead of drawing every single frame of your character directly into textures, break the character up into animatable parts, position the parts using transforms and then composite them into your animation frame at runtime. It's a fighting game, so this should be manageable (presumably you only have two animated characters, plus perhaps some relatively inexpensive environmental effects). As a result, you only need each unique part of each character, which should drastically reduce your texture budget (but increases the complexity of your animation engine).

You might look at DragonBones (http://dragonbones.github.com/getting_started_en.html) for help in achieving that.

0
votes

Where is this 2048 x 2048 limitation documented? I've never read such a thing. The only thing i could find in the Starling 1.1 documentation concerning texture atlas size is:

Any Stage3D texture has to have side lengths that are powers of two. Starling hides this limitation from you, but at the cost of additional graphics memory. By using a texture atlas, you avoid both texture switches and the power-of-two limitation. All textures are within one big "super-texture", and Starling takes care that the correct part of this texture is displayed.

Assuming i haven't completely missed this important detail and there is no size limitation on texture atlases, just create a one at 4096 x 4096 or 8192 x 8192.

0
votes

hmm - my guess is that using textures larger than 2048x2048 has an effect on performance. And i would further posit that shifting between textures of that size will also cause performance to take a hit. Have you looked into scaling down your texture assets and upscaling them in the game?