?/TD>
Microsoft DirectX 9.0

Maze


The maze sample is a Microsoft?DirectPlay?client/server application. There are two different client applications—a console-based version and a Microsoft Direct3D?client. The Direct3D client can optionally be run as screen saver by copying Mazeclient.exe to your \winnt\system32\ folder and renaming it Mazeclient.scr. Doing so will make it a screen saver that can be detected by the display control panel application.

Path

Path: (SDK root)\Samples\C++\DirectPlay\Maze

Executable: (SDK root)\Samples\C++\DirectPlay\Bin

User's Guide

There are three executable maze samples—MazeClient, MazeConsoleClient, and MazeServer. MazeClient is a self-contained executable file but MazeServer and MazeConsoleClient must be run together. Instructions for running each sample are described below.

Note  If you choose the Internetwork Packet Exchange (IPX) service provider and want to have DirectPlay perform a search for the address, select the use DPNSVR check box.

MazeClient

You can run MazeClient in three ways:

MazeConsoleClient

Start MazeConsoleClient by double-clicking the MazeConsoleClient icon in the Bin folder or by typing at the command prompt:

MazeConsoleClient.exe

MazeConsoleClient should automatically search for a session on the local network. If it does not, at the command prompt type:

setup

When asked if you want to connect to a local server, type:

Yes

If you are already running MazeServer, MazeConsoleClient will automatically connect and start. To search for a session at a specific Internet Protocol (IP) address, type it at the command prompt, for example,

MazeConsoleClient 255.255.255.255 

If a server is not found or the session is lost, it will exit automatically. Press CTRL+C to close the session.

MazeServer

Start MazeServer by double-clicking the MazeServer icon in the Bin folder or typing at the command prompt:

mazeserver.exe

MazeServer will automatically create a host session that clients can join. MazeServer.exe takes an optional command prompt parameter to set the size of the maze. For example, to set the maze to 16 wide and 128 high, type:

mazeserver.exe /size 16 128

The width and height are restricted to these numbers: 16, 32, 64, or 128.

Once started, the server will display a simple command prompt to control the server. Here is the list of commands.

helpLists simple commands you can use.
stopShuts down the server.
statsDisplays how many players are connected.
sr or serverreliable  Set what percentage of the packets going from the server to the client have the DPNSEND_GUARANTEED flag.
cr or clientreliableSet what percentage of the packets going from every client to the server have the DPNSEND_GUARANTEED flag.
cu or clientupdate Set how many milliseconds pass between updates from each client.
ct or clienttimeoutSets the timeout value of packets sent by the clients.
st or servertimeoutSets the timeout value of packets sent by the server.
ci or connectioninfoDisplays information about the connection from the server to a client. For example, ci 00300003.
loglevelSet how much extra information it provides about what is happening behind the scenes.


© 2002 Microsoft Corporation. All rights reserved.