O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—testing the input devices with a DirectInput wrapper

DirectInput offers a complex API. You do not want to learn the complete API because you just want to use the steering wheel in your XBAP WPF game.

There is a simple yet powerful wrapper for joystick style devices, developed in C# by Mark Harris. We can use it to obtain values from the steering wheel. There is an example Windows Forms application that can help us to understand how to work with this wrapper.

  1. Download the source code for the C# Joystick wrapper from its page in THE CODE PROJECT website, http://www.codeproject.com/KB/directx/joystick.aspx. The compressed file is joystick-src.zip.

    Tip

    The source code is available as part of the code that can be downloaded for this book. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required