What's New in DirectPlay
The networking component of Microsoft® DirectX® has undergone a major revision. Microsoft DirectPlay® introduces a new set of interfaces that enable games to have more direct access to the hardware, providing better performance.
The following list describes some of the new DirectPlay features.
- Interfaces have been completely rewritten.
- The complexity of creating a networked application has been dramatically simplified by separating the interfaces for creating peer-to-peer and client/server sessions. The interfaces for creating DirectPlay transport sessions, which are defined in the Dplay8.h header file, are now:
- IDirectPlay8Peer
- Provides methods for creating peer-to-peer sessions.
- IDirectPlay8Client
- Provides methods for creating the client-side portion of a client/server application.
- IDirectPlay8Server
- Provides methods for creating the server-side portion of a client/server application.
- Lobbying is now independent from the rest of DirectPlay.
- DirectPlay has removed the requirement that a lobby client work only with a DirectPlay application. This will allow for either the lobby service provider or the application to implement DirectPlay without concern for the other. Lobby implementation is now separated into two simplified interfaces that are defined in the Dplobby8.h header file.
- IDirectPlay8LobbyClient
- This interface is used to manage a lobby client and for enumerating and launching lobby-aware applications.
- IDirectPlay8LobbiedApplication
- This interface is used to register a lobby launchable application with the system so it can be lobby launched. It also is used to get the connection information from the lobby to enable game launching without querying the user.
- Voice transmission has been added.
- DirectPlay Voice provides a set of interfaces to add real-time voice communication to an application. The following interfaces are defined in the Dvoice.h header file.
- IDirectPlayVoiceClient
- Provides methods to create and manage clients in a DirectPlay Voice session.
- IDirectPlayVoiceServer
- Provides methods to host and manage a DirectPlay Voice session.
- IDirectPlayVoiceTest
- Used to test DirectPlay Voice audio configurations.
- Addressing information has moved from GUID-based data to URL-based data format.
- Previous versions of DirectPlay used binary chunks of data with GUID addresses that were difficult to implement and that humans could not read. In DirectX 8.0, DirectPlay introduces the representation of addresses in URL format. A set of interfaces, defined in Dpaddr.h, is used to create and manipulate the new addressing format.
- IDirectPlay8Address
- Provides generic addressing methods used to create and manipulate DirectPlay addresses.
- IDirectPlay8AddressIP
- Provides IP provider-specific addressing services.
- Higher scalability and better memory management have been added.
- Increases in consumer bandwidth have dramatically affected network game design and implementation. Improved DirectPlay thread-pool management makes it easier to for the developer to design scalable, more robust applications that can support massive multiplayer online applications.
- Better support for Firewalls and Network Address Translators has been added.
- Writing network games that traverse Network Address Translators (NATs), Firewalls, and other Internet Connection Sharing (ICS) methods can be difficult, particularly for non-guaranteed (UDP) traffic. Because DirectPlay 8.0 has been developed with these issues in mind, it will support NAT solutions where possible. The DirectPlay 8 TCP/IP service provider uses a single, developer-selectable UDP port for game data, making it possible to configure firewalls and NATs appropriately. Additionally, DirectPlay makes use of UDP so that, for client/server games, clients behind some NATs will be able to connect to games without additional configuration.