的XNA Game,全屏动画/视频播放 [英] XNA Game, Full Screen Animation / Video Playback

查看:397
本文介绍了的XNA Game,全屏动画/视频播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XNA游戏(它的老虎机)。

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

我有一些很酷的动画我的艺术家制作对我来说都或多或少1600x1000和50帧。

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).

的问题是,你只能加载图像具有一定规模。 2kx2k或高达4Kx4K取决于你的显示卡。显然,把每帧到一个文件是出这个大动画问题。

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)

我的问题:

如果任何是玩这些大型动画的好办法?

有没有好处有一个spritesheet而不是在单独的的Texture2D的?

加载帧有(免费)的方式在XNA播放全屏视频吗?

推荐答案

显然,XNA 3.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.

这篇关于的XNA Game,全屏动画/视频播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆