Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Path: (SDK root)\Samples\C++\DirectPlay\Maze
Executable: (SDK root)\Samples\C++\DirectPlay\Bin
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.
You can run MazeClient in three ways:
Start MazeClient from the Bin folder by double-clicking the MazeClient icon. This runs the sample in settings mode. When you click the icon, a dialog box appears. Choose the setting you want and click Launch. This starts the maze sample. To quit the sample, press any key or click the mouse.
To run MazeClient in test mode, at the command prompt type:
mazeclient.exe /t
In test mode, you can search and join a server game or you can choose to not connect to a server. There are few simple commands you can type when running mazeclient in test mode:
To run MazeClient in screen saver mode, at the command prompt type the following:
mazeclient.exe /s
This mode will autoconnect to a server using the settings from settings mode. If a server is not found, it will run without connecting to a server. It will also exit upon mouse or keyboard input.
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.
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.
help | Lists simple commands you can use. |
stop | Shuts down the server. |
stats | Displays 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 clientreliable | Set 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 clienttimeout | Sets the timeout value of packets sent by the clients. |
st or servertimeout | Sets the timeout value of packets sent by the server. |
ci or connectioninfo | Displays information about the connection from the server to a client. For example, ci 00300003. |
loglevel | Set how much extra information it provides about what is happening behind the scenes. |