无法打开包含文件 dplay8.h。没有那个文件或目录

Cannot open include file dplay8.h .No such file or directory

我们正在将 directx9 转换为 directx10,但出现错误:无法打开包含文件 :dplay8.h。 请提供如何解决此问题的解决方案以及从 directx9 转换为 direct10 可能需要的步骤。

DirectPlay 是一个已弃用的遗留组件。包含 headers 的旧版 DirectX SDK 的最后一个版本是 2007 年 8 月。请参阅 DirectX SDKs of a certain age。它在任何 Windows SDK 中都不可用。

它目前存在于 Windows 操作系统中,仅用于 appcompat。需要牢记一些重要的限制:

  • Windows Vista 或更高版本的操作系统不支持 DirectPlay 语音。参见 KB970978

  • Windows Vista 或更高版本不支持 NAT 助手 object

  • 在 Windows 8.x 和 Windows 10 上,DirectPlay 是一项可选的 Windows 功能,因此默认情况下不存在。它必须由用户启用。

简而言之,您不应该使用它。您应该计划重写该移植项目的多人游戏支持,或者将其删除。

当网络是一个复杂且不断发展的世界时,DirectPlay 的主要价值又回来了:调制解调器播放、head-to-head 串行端口、IPX/SPX、TCP/IP 通过调制解调器和 TCP/IP .此时 TCP/IP 是唯一重要的网络解决方案,因此直接使用 WinSock 更为可取。现代游戏还需要考虑使用 UDP(数据报)与 TCP(虚拟电路)的许多安全隐患。 DirectPlay 的游说机制也已经过时了。

有许多现代游戏服务(例如 Xbox LIVE、Valve 的 Steam 等)旨在提供 match-making、NAT-traversal 以及现代多人游戏必不可少的其他功能.您将 WinSock 与 service-specific 库结合使用。

In a related note, there is absolutely no reason to use DirectX 10. DirectX 11 supports much more hardware, is supported on all the same operating systems (Windows Vista SP2+), and has numerous replacements for legacy support libraries that don't exist for Direct3D 10.