游戏开发声音框架
我正在与一个团队合作,该团队正在为各种 2D 以及最终的 3D 迷你游戏构建引擎。 我们面临的问题是可靠的、跨平台的、健全的 API。 显然,由于我们对跨平台功能的需求,DirectX 是不可能的。 SDL 很好,而且工作得很好,但让我们面对现实吧,SDL_Mixer 的功能有点有限。 我们目前正在使用它,但当我们最终扩展到 3D 时,这将是一个问题。
我一直在搞乱 OpenAL,但我发现的大多数文档都相当过时,而且似乎并没有那么好用。 我愿意学习 OpenAL,并努力通过它,但我想更加确定我没有浪费时间。 不过,除了 DevMaster 教程之外,我还没有看到太多让我震惊的文档。 如果有人有比我发现的更好的材料,那就太棒了。
我也见过 FMOD 等项目,尽管有许可,但看起来还不错。 然而,与 OpenAL 一样,它们几乎不存在文档。 诚然,我可以通过输入代码来推断出我的选择,但考虑到我最终可能会为此付出代价,这似乎有点痛苦。
不管怎样,有什么想法、评论、担忧吗? 多谢!
I'm working with a team that's building an engine for a variety of 2D and eventually 3D mini-games. The problem we're facing is a solid, cross-platform, sound API. Obviously, DirectX is out of the question due to our needs for cross-platform capabilities. SDL is nice, and works great, but let's face it SDL_Mixer is a bit limited in what it can do. We're currently using it, but when we eventually expand to 3D, it's going to be a problem.
I've been messing with OpenAL, but most of the documentation I've found is fairly out of date, and doesn't seem to work all that great. I'm willing to learn OpenAL, and fight my way through it, but I'd like to be a bit more certain that I'm not wasting my time. Other than the DevMaster tutorials though, I haven't seen much documentation that's blown me away. If someone has some better material than I've found, that'd be awesome.
I've also seen projects such as FMOD, which seems decent despite the licensing. However, like OpenAL, they have nearly non-existant documentation. Granted, I can pour over the code to deduce my options, but it seems like a bit of a pain considering I might eventually be paying for it.
Anyways, thoughts, comments, concerns? Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我在发行的游戏中的一系列平台上使用了 DirectX、FMOD 和 Wwise。 我不会在这里谈论 DirectX,因为其他人会在这里得到很多反馈;-)
以下是您需要考虑的内容:
许可证,我把它放在第一位,因为这可能会为您做出决定。 让你的律师仔细检查一下,并确保你了解成本和限制。
API - FMOD 有一个非常干净、最小的 API,非常容易理解。 Wwise 在功能方面提供了更多的功能,但它的 API 似乎更大且繁琐,并且概念笨拙,难以理解。
工具 - Wwise 拥有非常复杂的工具,非常适合音频设计师而不是程序员,如果您想为音频设计师提供大量直接控制和实验空间,Wwise 可能是您的最佳选择。 FMOD 在工具方面正在迎头赶上,但我觉得它的工具更适合程序员。
性能 - 这是您需要自己评估的东西,您不能说任何一个都比另一个更好,因为这取决于您的平台和游戏类型。 您可能会得到引用的性能统计数据 - 对这些数据持保留态度,它们很可能以某种方式理想化。 确定您的性能预算(例如,声音每帧 2 毫秒、通道数量 X、流数量),并对不同的声音格式、采样率和位深度进行大量测试 - 将这些糟糕的情况绘制出来。
支持 - FMOD 和 Wwise 都有非常好的支持渠道和优秀的技术人员。 检查支持是否需要额外费用。
如果你让我选择一个.. FMOD - 这确实是一个非常好的产品,那些人做得很好。
I have used DirectX, FMOD and Wwise on a range of platforms in shipped games. I won't talk about DirectX here since other people will have plenty of feedback here ;-)
Here's what you need to consider:
License, I put this first because this may make your decision for you. Have your lawyer go over them and make sure you understand the costing and restrictions.
API - FMOD has a very clean, minimal API that is very easy to grok. Wwise offers a little more in terms of functionality, but its API seems much larger and cumbersome with awkward concepts to get your head around.
Tools - Wwise has very sophisticated tools, geared very much towards audio-designers rather than programmers, if you want to give audio designers a lot of direct control and room for experimentation, Wwise may be the way to go. FMOD is catching up in the tool department but its tools are more geared towards programmers I feel.
Performance - This is something you'll need to evaluate for yourself, you can't say any one is better than the other because it depends on your platform and type of game. You may get performance statistics quoted to you - take these with a grain of salt, they may well be idealised in some fashion. Determine your performance budget (eg 2 ms per frame for sound, X number of channels, X number of streams) and do a bunch of tests for different sound formats, sample rates and bit depths - graph those suckers.
Support - Both FMOD and Wwise have very good support channels, good tech guys. Check if support costs extra though.
If you're asking me to pick one.. FMOD - it really is a very good product, those guys do a great job.
(注:我有使用 FMOD、BASS、OpenAL 和 DirectSound 的经验;虽然我在下面列出了其他库,但我还没有使用过它们)。
BASS 和 FMOD 都很好(实际上我非常喜欢 FMOD 的文档;为什么你会说它“不存在”?)。 还有Miles 音响系统、Wwise、irrKlang 以及更多中间件软件包。
OpenAL 据称是跨平台的,并且在每个平台上它都有自己的怪癖。 它也不完全是“开放”的。 我不确定它的未来是什么; 当 Creative 抓住它时,它似乎被卡住了。 不过,最近有人努力从头开始构建实现:OpenAL Soft。
然后还有本机平台 API,例如 Windows 的 DirectSound 或 XAudio2、OS X 的 Core Audio、Linux 的 ALSA、控制台的专有 API 等。我认为在每个平台上使用本机 API 很有意义; 您只需将其抽象为您需要的通用接口,并在每个平台上有不同的实现。 当然,这比仅仅使用 OpenAL 要做更多的工作,但 OpenAL 甚至在某些平台上不可用,并且在其他平台上有各种您甚至无法修复的怪癖(因为没有可以修复的源代码)。 从某种意义上说,授权 FMOD 或 Miles 等商业库是一种选择,因为所有这些依赖于平台的工作都已经为您完成了。
我们现在在工作中使用 OpenAL,但正在考虑放弃它,因为它没有任何进展,而且我们无法解决问题。 因此,虽然 OpenAL 很容易上手,但我认为它并不是一个好的选择。
(note: I have experience with FMOD, BASS, OpenAL and DirectSound; and while I list other libraries below, I haven't used them).
BASS and FMOD are both good (and actually I liked FMOD's documentation a lot; why would you say it's "non existing"?). There are also Miles Sound System, Wwise, irrKlang and some more middleware packages.
OpenAL is supposedly cross platform, and on each platform it has it's own quirks. It's not exactly "open", either. And I'm not sure what is the future for it; it seems like it got stuck when Creative got hold of it. There's a recent effort to built the implementation from ground up, though: OpenAL Soft.
Then there are native platform APIs, like DirectSound or XAudio2 for Windows, Core Audio for OS X, ALSA for Linux, proprietary APIs for consoles etc. I think using native APIs on each platform makes a lot of sense; you just abstract it under common interface that you need, and have different implementations on each platform. Sure, it's more work than just using OpenAL, but OpenAL is not even available on some platforms, and has various quirks on other platforms that you can't even fix (because there's no source code you can fix). Licensing a commercial library like FMOD or Miles is an option in a sense that all this platform dependent work is already done for you.
We're using OpenAL at work right now, but are considering switching away from it, because it's just not going anywhere and we can't fix the quirks. So while OpenAL is easy to get started, it does not get my vote as a good option.
Bass 库适用于 Mac 和 Windows,并具有良好的文档和 SDK 示例:
http://www.un4seen.com/
The Bass library works on Mac and Windows, and has good documentation and SDK examples:
http://www.un4seen.com/
我最近开发了一款使用 FMOD 的 AAA PC 游戏。 我们的音频程序员非常喜欢它并且工作效率很高,所以我对 FMOD 竖起大拇指。 我们只在 Windows 上使用 FMOD,所以我根本无法谈论它的跨平台方面。
I've recently worked on a AAA PC title that used FMOD. Our audio programmer loved it and was very productive with it, so I'd give FMOD a thumbs up. We only used FMOD on Windows so I can't speak to the cross-platform aspects of it at all.
我已经使用 Miles Sound System 发行了两款 PC 游戏,效果非常好。 MSS 易于集成、快速且稳定。 您从 RAD Game Tools 获得的支持非常出色。 该库已在 4500 多款游戏中使用,因此坚如磐石。 也很便宜!
另一方面,与 FMOD 或 WWise 相比,MSS 是一个相当低级的库。 该库没有为声音设计师提供任何方法来控制音量、衰减、随机化、淡入淡出或任何未存储在声音文件本身中的其他内容。 您必须自己编写这些高级功能。
这就是我在下一款游戏中评估 WWise 的原因。 它拥有比 Miles 更发达的工具集。 启动和运行需要更长的时间,但到目前为止运行良好。 我还没有深入地使用它来真正以一种或另一种方式提供建议。
I've shipped two PC games using Miles Sound System and it worked quite well. MSS is easy to integrate, fast, and stable. The support you get from RAD Game Tools is excellent. This library has been used in over 4500 games, and it is rock-solid as a result. It's cheap too!
On the other hand, MSS is a fairly low-level library compared to FMOD or WWise. The library doesn't provide any way for the sound designer to have control over sound volumes, attenuation, randomization, fading, or just about anything else that isn't stored in the sound file itself. You will have to write these high level features yourself.
That's why I'm evaluating WWise for my next game. It has a much more developed toolset than Miles. It took longer to get up and running, but is working well so far. I'm not nearly far enough into using it to really offer a recommendation one way or the other.
就工作流程而言,Wwise 可能是最完整的声音开发解决方案。 它的设计方式确实节省了您的编程时间,并为您提供了更多尝试和构建复杂声音结构的可能性。 借助 Wwise,我们能够让团队的项目井井有条。
我个人非常喜欢他们的互动音乐系统。 它非常灵活,可以让您的音乐对您的游戏输入做出流畅的反应。
此外,Audiokinetic 的支持也非常敏锐。 始终快速并随时准备提供帮助。
我建议。
Wwise is probably the most complete solution for sound development in terms of workflow. The way it's designed really saves you programming time and gives you more possibilities to experiment and build complex sound structures. With Wwise, we were able to keep the project organized for our team.
I personally really like their interactive music system. It's flexible and makes your music smoothly react to your game inputs.
Also, Audiokinetic's support is very sharp too. Always fast and ready to help.
I recommend.
我也可以为 FMOD 提供保证,由于其工具和出色的多平台支持,它在游戏开发中得到了广泛的使用。 与它的设计师合作真的很幸福。 但事实是,它需要昂贵的商业开发许可证。
I can vouch for FMOD as well, it's used quite a extensively in game development due to the tools and excellent multi-platform support. It's designers are really a bliss to work with. Thing is though, it requires an expensive license for commercial development.