XNA 游戏,全屏动画/视频播放

发布于 2024-08-19 13:40:03 字数 493 浏览 1 评论 0原文

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

我的艺术家为我制作了一些非常酷的动画,尺寸大约为 1600x1000,帧数超过 50。

到目前为止,对于所有动画,我一直在使用精灵表。 (所有帧都在一个图像文件中,并且在渲染时选择要显示图像的哪一部分)。

问题是您只能加载特定尺寸的图像。 2kx2k 或 4kx4k 取决于您的显卡。显然,对于这个大型动画来说,将每一帧放入一个文件中是不可能的。

您可以单独加载每个图像并按顺序显示它们吗? (无论如何,在我发现这不是你应该做的事情之前我曾经对较小的动画所做的)

我的问题:

如果有的话是一个好方法吗?播放这些大型动画?

使用 spritesheet 而不是将帧单独加载为 Texture2D 是否有好处?

是否有一种(免费)方式在 XNA 中播放全屏视频?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁把谁当真 2024-08-26 13:40:03

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文