将大多数 Windows 版本作为 2D 游戏的目标?
如果要为大多数版本的 Windows 编写一款游戏,应该使用哪个 API?
我知道 DirectDraw 在 NT4 及更高版本上工作(尽管 DirectDraw 是在 NT4 上使用 GDI 模拟的)。但是,我听说 DirectDraw 在较新版本的 Windows 中已被弃用?
我可以恢复为仅使用 GDI,但是很难完全消除闪烁和撕裂,因为缓冲区之间没有翻转 的双缓冲。
我应该选择 Direct3D 还是 DirectDraw?或者有什么方法可以完全消除 GDI 中的闪烁吗?
如果 Direct3D 是答案,那么大多数平台都支持哪个版本?
If one were to code a game for most versions of Windows, which API should be used?
I know DirectDraw works from NT4 and up (although DirectDraw is emulated on NT4 with GDI). However, I am told DirectDraw is deprecated in newer versions of Windows?
I could revert to just GDI, but then it is hard to completely eliminate flicker and tearing, since there is no double buffering with flipping between buffers.
Should I go for Direct3D or DirectDraw? Or is there some way of completely eliminating flicker in GDI?
If Direct3D is the answer, which version of it is supported on most platforms?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您确定您永远不会想要将游戏移植到任何非 Windows 平台,否则我会推荐 OpenGL。它应该适用于 2000 及以上的所有版本,一些幸运的 NT4 或 Win98 用户可能能够运行它(但不要将这些版本宣传为“受支持”。)硬件加速并不总是有效,但会对性能产生影响对于简单的 2D 游戏来说不会引人注目。如有必要,您还可以以相当便宜的价格将其移植到其他平台(例如 iPhone)。
Unless you are sure you will never want to port your game to any non-Windows platform, I would recommend OpenGL. It should work on all versions from 2000 upwards, and some lucky NT4 or Win98 users may be able to run it (but don't advertise those versions as "supported.") Hardware acceleration won't always work, but the impact on performance won't be noticeable for a simple 2D game. And you will be able to port it reasonably cheaply to other platforms (e.g. iPhone) if necessary.