XNA Game, Full Screen Animation / Video Playback

此生再无相见时 提交于 2019-12-22 11:37:36

问题


I have an XNA game (its a slot machine).

I have some really cool animations my artist made for me that are more or less 1600x1000 and over 50 frames.

For all of the animations so far I have been using sprite sheets. (Where all the frames are in one image file and when its rendered it chooses what part of the image to show).

The problem is that you can only load an image of a certain size. 2kx2k or 4kx4k depending on your videocard. Obviously putting each frame into one file is out of the question for this large animation.

Can you just load each image individually and display them in order? (That is what I used to do for the smaller animations anyway before I found out that isn't how you were supposed to do it)

My Questions:

What if any is a good way to play these large animations?

Is there a benefit to having a spritesheet instead of loading the frames in individually as Texture2D's?

Is there a (free) way to play fullscreen videos in XNA?


回答1:


Apparently, XNA 3.1 "now supports the ability to play back video that can be used for such purposes as opening splash and logo scenes, cut scenes, or in-game video displays." That is what you'll want to use - the sizes you're talking about are far too big for conventional animation techniques. Some sample code is here.



来源:https://stackoverflow.com/questions/2131439/xna-game-full-screen-animation-video-playback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!