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.
Answer
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
List
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.
No comments:
Post a Comment