该游戏的理想选择是 XNA 还是 SlimDX (DirectX 10)?

发布于 2024-09-24 16:29:27 字数 598 浏览 1 评论 0 原文

我正在寻找用 C# 开发多点触控节奏游戏。到目前为止,我已经决定了游戏必须绝对存在的几个要求:

1)Unicode 文本显示,无需事先知道字符(即显示的字符串在编译时未知,而是由用户输入) .
2) 支持所有常见图像格式(PNG、JPG、BMP、GIF)的显示以及各种音频(MP3、WAV、OGG、FLAC)和视频格式的播放。
3)完全多点触控支持(我希望支持用户硬件允许的尽可能多的同时输入)。

我一直在摆弄 XNA,但我发现用 SpriteFonts 绘制任意 Unicode 文本很困难(当你尝试加载整个 CJK Unified 集时,它讨厌它)。此外,我还没有找到在 XNA 中加载某些格式(例如 Ogg Vorbis 音频)的简单方法。

因此,考虑到这一点,我开始考虑通过 SlimDX 使用 DirectX 10。然而,我非常迷失,不确定如何开始使用它以及我需要的功能是否存在于其中。最重要的是,SlimDX 文档似乎非常缺乏,尤其是对于我来说是游戏开发的新手。这两个框架中哪一个最适合我的目标?

编辑 1:任何有关使用 SlimDX(2010 年 6 月)开始游戏开发的参考资料也会非常有帮助,尤其是与我最有可能使用的 Direct2D 相关的内容。

I'm looking to develop a multitouch rhythm game in C#. So far, I've decided on several requirements for the game that must absolutely be present:

1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user).
2) Support for display of all the common image formats (PNG, JPG, BMP, GIF) and playback of various audio (MP3, WAV, OGG, FLAC) and video formats.
3) Full multitouch support (I'd like to support as many simultaneous inputs as the user's hardware allows).

I had been fiddling with XNA, but I've found drawing arbitrary Unicode text with SpriteFonts difficult (it hates it when you try and load the entire CJK Unified set). In addition, I haven't found an easy way to load certain formats like Ogg Vorbis audio in XNA.

So, with this in mind, I've started looking into using DirectX 10 via SlimDX. However, I'm very lost, and am unsure of how to start with it and if the features I need are even present in it. To top it off, SlimDX documentation seems to be very lacking, especially with me being new to game development. Which one of the two frameworks would be best for my goals?

EDIT 1 : Any references to starting game development with SlimDX (June 2010) would be very helpful as well, especially in relation to Direct2D, which what I'll most likely be using.

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

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

发布评论

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

评论(1

牛↙奶布丁 2024-10-01 16:29:27

基于您对 SlimDX 文档的关注以及您想要使用 Multitouch 的事实(我无法确定是否可以从 SlimDX 访问它 - 请参阅文档注释),我建议使用 XNA。

XNA 没有立即支持 OGG,但有几个不错的转换器。如果您不想事先麻烦地转换它们,您可以创建自己的内容管道处理器来为您进行转换。假设您不想实际尝试手动读取字节并处理它们,您可能希望在独立模式下或通过在自定义导入器中使用命令行来使用此工具:
http://klucher.com/blog/game- development-program-of-the-week-xrecode/%20

对于字体,您可以修改 XML 文件以仅指定您想要的字符。因此,如果您知道只会使用 1/2 的字符,那么您可以将其放入 .spritefont xml 文件中,并且只会生成这些字符。

借助新的 XNA Game Studio 4(仍处于 Beta 阶段,但绝对是您应该开始使用的),它内置了对多点触控的支持。它还内置了一些手势,并且适用于 Windows Phone 7。我的假设是,XNA 团队不久后也会在 Windows 7 中提供它。同时,请查看 Shawn Hargreaves 的博客。他有 他的输入部分下有一篇关于此的文章

有大量使用 Microsoft 的 XNA 库的示例,因此如果您刚刚开始,这可能是无价的。

希望这有帮助,

查德

Based off of your concern of SlimDX documentation and the fact that you want to use Multitouch (which I can't determine if that is accessible from SlimDX - refer to documentation comment) I'd suggest going with XNA.

XNA doesn't have immediate support for OGG but there are several nice converters out there. If you didn't want the hassle of converting them before hand, you could create your own Content Pipeline Processor to do the conversion for you. Assuming you don't want want to actaully try and read in the bytes manually and process them you may want to use this tool either in standalone mode or by utilizing the command line in your custom importer:
http://klucher.com/blog/game-development-program-of-the-week-xrecode/%20

For the fonts you can modify the XML file to only specify the characters you want. So if you know you will only utilize 1/2 of the characters then you can put that in the .spritefont xml file and only those characters will be generated.

With the new XNA Game Studio 4 (Still in Beta, but definitely what you should start out using) it has built in support for multitouch. It has some gestures built in as well and works for Windows Phone 7. My assumption is that the XNA team will make it accessible in Windows 7 as well before too long. In the mean time, check out Shawn Hargreaves' blog. He has an article under his input section on this.

There are tons of examples using Microsoft's XNA library so if you are just starting out this could be invaluable.

Hope this helps,

Chad

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