Microsoft DirectX 8.1 (C++) |
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: (SDK root)\Samples\Multimedia\DirectPlay\Maze
Executable: (SDK root)\Samples\Multimedia\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 on 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 /tIn 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:
mazeclient.exe /sThis 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.exeMazeConsoleClient should automatically search for a session on the local network. If it does not, at the command prompt type:
setupWhen asked if you want to connect to a local server, type:
YesIf you are already running MazeServer, MazeConsoleClient will automatically connect and start. To search for a session at a specific IP address, type it at the command prompt, for example,
MazeConsoleClient 255.255.255.255If 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.exeMazeServer 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 128The 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. |