Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the best way to have large animations in XNA 4.0? I have created a spritesheet with the sprite being 250x400 (more of an image than a sprite but hey ho) and there are approximately 45 frames in the animation. This causes problems for XNA as it says that the maximum filesize for Reach is 2048.

I'd rather not change to hidef as I heard that means that your game is less compatible with some computers and systems so does anyone have any idea what the best thing I could do is? The only thing I could come up with is to have a list of textures to flick through but that's not ideal.

share|improve this question
How many active instances of the sprite are going to be active at once? – AttackingHobo Mar 1 '11 at 20:00
up vote 5 down vote accepted

Since you wont answer my comment above I will give you a few options.

1 . Use a tilesheet that spans multiple Textures.

2 . Use a


You can make this easier by making a png sequence with BigImage0001,BigImage0001,BigImage0001....

Import all of those.

Make a method that takes a name, Trailing numbers, and total frames. Have it return the built list of textures.



Use 1 if you have a lot of instances of the animation, that are playing at different frames, as it will reduce the amount of SpriteBatch calls XNA has to process.

Use 2 if you have a small amount of instances, it will reduce video memory consumption, but each instance more will increase the SpriteBatch calls.

share|improve this answer
I think this is the best alternative. Only one frame will be drawn, so it's no a huge deal if each frame is in a separate texture. (unless there are multiple instances) – Michael Coleman Mar 2 '11 at 3:48
Yeah, this seems like the best way, thanks. Sorry I didn't respond to your message before, but I was already in bed by then ^^ – Harold Mar 2 '11 at 6:22

Basically if you are targeting towards Direct9 then you can't use HiDef. You could always create a smaller animation and just set the scale to a higher amount(allowing it to zoom in on the image), if its a vectors image it won't skew the image.

share|improve this answer
XNA doesn't have built in support for vector graphics, if that's what you meant: So making the image smaller and scaling it up will cause some pixelation... depending on how scaled it is. – Venesectrix Mar 1 '11 at 21:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.