DirectX SDK

DIGame Sample

[Visual Basic]

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

[C++]

Description

The DIGame sample application is a simple shooting game that can be played with keyboard, mouse, or joystick.

Path

Source: (SDK root)\Samples\Multimedia\DInput\Src\DIGame

Executable: (SDK root)\Samples\Multimedia\DInput\Bin

User's Guide

The default input device is the keyboard. Change the device by choosing Select Input Device from the File menu.

Move the ship up and down with the arrow keys, the mouse, or the joystick. Change directions by moving left or right. Fire by pressing the spacebar, the left mouse button, or the primary button on the joystick.

To start again, select New Game from the File menu.

Programming Notes

The input code is all in Digame.cpp.