DirectPlay Notes: 1. What's New! -------------- See the DirectPlay section in the DirectX help file for more details on what's new. Highlights include: - IDirectPlayLobby - an interface that allows an external application to launch a DirectPlay 3.0 application and provide it with all the connection information needed to get connected to a session. Try out the DPLAUNCH sample application for a demo of this! - Internet TCP/IP service provider - now you can have multiplayer applications over the Internet - Unicode support - Host migration - Automatic player data propagation - Better performance, less overhead, more stability and robustness - Support for 3rd-party network service providers All the new functionality of DirectPlay is in the IDirectPlay2 (Unicode) and IDirectPlay2A (ANSI) interfaces. When compiling, it is recommended that you define the symbol IDIRECTPLAY2_OR_GREATER to make sure that you are not using any obsolete flags or structures. The IDirectPlay interface has not changed from previous versions of DirectPlay. 2. Samples ---------- The following samples can be examined for examples of how to use DirectPlay SDK/SAMPLES/DUEL - This simple multiplayer game uses the new IDirectPlay2 interface - It also uses IDirectPlayLobby to make it lobby-able SDK/SAMPLES/DPLAUNCH - This stand-alone application demonstrates how a DirectPlay 3 app can be launched from an external source using the IDirectPlayLobby interface SDK/SAMPLES/IKLOWNS - Another multiplayer game which still uses the old IDirectPlay interface - It also use IDirectPlayLobby to make it lobby-able 3. General Notes ---------------- -- The names of the DirectPlay 3 DLLs have changed. The names of the new DLLs are: dplayx.dll - DirectPlay 3 dll dpwsockx.dll - Winsock service provider (TCP/IP and IPX) dpmodemx.dll - modem and serial service provider. Make sure that any applications in development link to DPLAYX.LIB. Applications compiled with DirectPlay 2 or earlier will not use these new DLLs and therefore not benefit from the enhancements of DirectPlay 3. *** If you installed Beta1 of DirectX 3, the DirectPlay 3 DLLs will have overwritten any DirectPlay 2 DLLs you may have had installed. Beta2 will delete these DLLs if they have the version number of DirectX 3 (4.04.xxxx) *** To restore them, simply reinstall DirectX 2 or any game that uses DirectX 2. Alternatively, copy the files DPLAY.DLL, DPWSOCK.DLL and DPSERIAL.DLL from your DirectX 2 CD to the windows SYSTEM directory. -- The synchronization event parameter in IDirectPlay2::CreatePlayer has been changed to a HANDLE (from an LPHANDLE). The handle must be created by the application. Passing in an LPHANDLE will NOT generate a compiler error but it will cause the method to return an error. -- Make sure you read and understand the behavior of the DPSEND_GUARANTEED flag in the Send() API. Additional text has been added to clarify the usage of this flag. -- The Internet TCP/IP service provider now maintains a cache of open sockets to improve the performance of guaranteed messages i.e. sockets will not be opened and closed for each individual message. Calling GetCaps() and asking for the guaranteed capabilities will tell you how many players can be supported (dwMaxPlayers). -- If an application tries to send messages that are larger than the maximum packet size of a protocol, DirectPlay will break it up and send it using multiple packets and reassembling the packets on the receiving end into a single message. -- Added ability to host more than one game on a single machine (TCP/IP only) -- The DirectPlay Address structure now uses GUIDs to identify chunks in the address instead of four character codes. -- Applications with short timeouts will not work over the Internet due to the long latencies. Applications should specify a timeout value of zero in EnumSessions in which case an appropriate timeout will be calculated by the service provider. -- DirectPlayConnect is obsolete. An application will need to create an IDirectPlayLobby interface. It may query the connection settings that the lobby passed in using GetConnectionSettings, and modify them using SetConnectionSettings. It highly recommended that the application verify that the correct session description flags are set using this method. Finally, the application should call the Connect method and then Release the IDirectPlayLobby interface. -- There is now an ANSI and a UNICODE version of the DirectPlayLobbyCreate API. The version is selected based on the UNICODE compile-time flag. -- To use TCP/IP over the Internet, the users joining the session must enter the IP address of the machine that hosted the game when prompted by the service provider. You can find out the IP address of your machine by running "winipcfg". If you have a net card and a modem installed, you will need to make sure you read the IP address of the modem connection to the Internet. The IP address information for the modem will typically show up under "PPP Adapter". 4. Known Problems ----------------- -- Inside of any DirectPlay enumeration callback only the thread running the callback can make calls back into the DirectPlay API. Other threads and the service provider will be blocked from calling DirectPlay until the enumeration has completed, so it is important to have enumeration callbacks complete quickly. -- IPX will not allow playing more than one game simultaneously. Use TCP/IP to do that. -- There is no multi-home support for IPX. Use TCP/IP if multi-homing is needed. -- If an application sets the player name or remote data for a non-local player, the change will not be propagated to the remote applications. -- DirectPlay generally will not work through proxies and firewalls.