Platform SDK: DirectX

SimpleConnect Sample

[Visual Basic]

This topic pertains only to application development in C++. See DirectPlay Visual Basic Samples.

[C++]

Description

The SimpleConnect sample shows how to create and join a DirectPlay session, and how to send and receive messages.

Path

Source: (SDK root)\Samples\Multimedia\DPlay\Src\SimpleConnect

Executable: (SDK root)\Samples\Multimedia\DPlay\Bin\SimpleConnect.exe

User's Guide

Enter the player's name, and select a connection type or "Wait for Lobby Connection" from the list. In the Multiplayer Games dialog, start a new session by clicking Create, or else click Start Search to find active sessions, then join one by highlighting it and clicking Join. The "game" begins immediately, but other players can join at any time. By clicking Wave to Other Players you send a message to all other players in the session. The host player can leave at any time, because DirectPlay automatically migrates the host player.

Note that you can test multiple instances of the sample on a single machine by using the TCP/IP service provider.

Programming Notes

This sample shows the basics of using DirectPlay for a game.