What's New in DirectPlay Version 3?
The DirectPlay version 3 API is fully compatible with applications written for any previous version of DirectPlay. That is, you can recompile your application by using DirectPlay on the DirectX 3 SDK without making any changes to the code. DirectPlay supplied with the DirectX 3 SDK supports all the APIs and behavior of earlier DirectPlay versions.
The names of the DirectPlay 3 DLLs are different from those in previous DirectPlay versions, so applications compiled with DirectX 2 or earlier do not use the new DirectPlay DLLs. To use the new DLLs, the application must be recompiled and linked to the Dplayx.lib import library.
It is strongly recommended that you update your application to use the new IDirectPlay2 or IDirectPlay2A interfaces, and add the code necessary to make the application lobby-able. This means that an external lobby or matchmaking program can start the application and supply it with all the information necessary to connect to a session. The application need not ask the user to decide on a service provider, select a session, or supply any other information (such as a telephone number or network address).
In addition, several other new features have been added to the DirectPlay API, including the following:
·Internet support.
·Direct serial connection.
·More stability and robustness.
·Support for Unicode to better support localization.
·Host migration. If the host of a session drops out of the session, host responsibilities are passed on to another player. In DirectPlay version 2, if the host (name server) left a session, no new players could be created.
·Ability of the application to communicate with the lobby program to update games status for spectators, as well as receive information about initial conditions.
·Ability to host more than one application session on a computer.
·Ability to determine when a remote computer loses its connection and to generate appropriate messages.
There are also other features in DirectPlay 3 that you can use to reduce the amount of communication-management code in your application, including the following:
·Ability to associate application-specific data with a DirectPlay group ID or player ID. This allows the application to leverage the player and group list-management code that is already part of DirectPlay. Local data is data that the local application uses directly, such as a bitmap that represents a player. Local data is not propagated over the network. Remote data is associated with the player or group. DirectPlay propagates any changes to remote data to all other applications in the session. Remote data must be shared among all the applications in a session, such as a player's position, orientation, and velocity. By using DirectPlay functions to propagate this data, the application need not manage it by using a series of methods that send and receive information.
·Ability for application to associate a name with a group. This is useful for team play.
Some of the new features of DirectPlay 3 are not directly related to your application, including the following:
·APIs that the lobby client software uses to start and connect a lobby-able DirectPlay application. Also included are APIs that allow an application and the lobby to exchange information during a session.
·Service Provider development kit that includes documentation and sample code for creating your own service provider.
This section discusses the new DirectPlay 3 methods, the steps you must take to migrate to the IDirectPlay2 interface, and how you can access DirectPlay's updated functionality. The following topics are discussed: