Platform SDK: DirectX

Duel Sample

[Visual Basic]

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

[C++]

Description

The Duel sample is a multiplayer game that can be launched from a lobby. As well as demonstrating the use of DirectPlay, it uses DirectDraw, DirectInput, and DirectSound.

Path

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

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

User's Guide

Press ENTER to begin. You can then choose to host a new game or join an existing game.

All players in the game are represented by a small spaceship in an asteroid field. Use the left and right arrows to turn the ship left and right. The up arrow accelerates your ship forward. The down arrow accelerates it backward. Press the spacebar to fire. To exit the game, press ESC or F12.

Although it is possible to run multiple instances of the program on a single computer by using the TCP/IP connection, only the foreground instance will be updated.

To play using TCP/IP over the Internet, users who are joining the game must enter the IP address of the machine that hosted the game. A Windows 95 or Windows 98 user can determine the local IP address by running Winipcfg.exe. In Windows 2000 the same can be done by running Ipconfig.exe. If the user is connected to both a LAN and a dial-up Internet service provider (ISP), the computer can have two IP addresses, and the correct one must be selected for that connection. Most dial-up ISPs assign a dynamic IP address that changes each time the user logs on.

The game will not work through proxies or firewalls.