0
votes

I am working on a game and I need to have two characters talking to eachother. I know that XNA does not allow me to play a movie other than fullscreen so I need to actually "play" the animation inside my game app in a different manner. The characters have animated environments around them so the animations are not simple head movements and as such, animating the characters via keyframing in a 3d model is not an option. The dialogue between the two characters is a cut-scene between levels, so it is not part of the gameplay itself.

I am not sure what the best approach to this would be so if you have any ideas, please let me know.

This is what I thought of so far:

1. Create all the individual frames for the characters as images. Load these images in a spritesheet and go through each frame at my desired framerate.

The problem with this approach is that the maximum spritesheet texture of 2048x2048 would not allow for too many frames as the characters are something around 300x200. The other problem is that I have two characters so, the minimum scenario would require me to create in memory two 2048x2048 spritesheets... and I'd like to keep the memory requirements low.

2. Load a batch of frames (images), play them, then de-allocate them and load the next set. I know that in general it is not a good idea to load lots of small textures and switch between them in drawing calls (performance wise) but it seems as though I have no other choice in this case.

I am afraid that unloading stuff from memory and loading other stuff in while in the Update-Draw loop would slow down the entire scene... so not sure if this is a sane approach.

The other idea is to make an mp4/wmv with the whole thing [char animation, subtitles of the dialogue, etc] but the interface that hosts these characters would not be as "smooth" as when rendered directly, etc...

Thank you for all your suggestions,

Marius

EDIT 1:

I have tested scenario number 2 and it seems that the performance is OK.

1
I know that XNA does not allow me to play a movie other than fullscreen are you sure?Lukasz Madon
It seems that this is the case for Windows Phone 7...MariusVE

1 Answers

0
votes

I have used scenario 2. It works for my particular case but I am sure it won't work for all cases.