O'Reilly logo

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

Game Development with SlimDX

Book Description

A fast-paced and practical guide on game development using SlimDX

  • Harness the power of DirectInput and XInput to detect and respond to user input from keyboard, mouse, and joysticks/gamepads while adding the allimportant interactivity to your games
  • Make the most of Direct2D, DirectSound, XAudio2, and Direct3D to make your game worlds come to life on the screen
  • A practical guide packed with example code and quick instructions on game development with SlimDX

In Detail

Video games have been around for quite some time, but SlimDX has become a big thing in game development in recent years. It is a free open source framework that lets you bring your own virtual world to life using the power of DirectX.

This tutorial gives you a good head start into the world of game development with SlimDX. You will learn everything you need to know to start making your own 2D and 3D games.

This book takes you through some of the most important areas of game design, such as handling user input, 2D graphics, and adding sound and music to your games. You will learn the advanced topic of 3D graphics, which will get you started on making your own games. It will guide you fully in working with 2D game worlds and animated 2D characters by developing a 2D tilebased game world with a goofy, animated robot character for the player to control, and other demos.

By learning the basics of creating 3D graphics, you will be comfortable building 3D worlds in your own game.

Table of Contents

  1. Game Development with SlimDX
    1. Table of Contents
    2. Game Development with SlimDX
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started
      1. Setting up Visual Studio 2013 Express
      2. Setting up SlimDX
      3. Creating a framework
      4. The GameWindow class
        1. The constructor
        2. The IDisposable interface
      5. The GameLoop method
      6. Testing our game window
      7. Summary
    9. 2. Responding to Player Inputs
      1. DirectInput versus XInput
      2. Mouse and keyboard input
        1. The constructor
        2. Initializing DirectInput
        3. The Update() method
        4. The IDisposable interface
        5. Updating the GameWindow class
      3. Using joysticks with DirectInput
        1. Enumerating devices
      4. Getting input from the joystick
      5. Using joysticks with XInput
      6. Summary
    10. 3. Rendering 2D Graphics
      1. Creating a Direct2D game window class
        1. The constructor
        2. Creating our rectangle
        3. Drawing our rectangle
        4. Cleanup
      2. Rendering bitmaps
        1. Initialization
        2. Rendering the game world
        3. Rendering the player character
        4. Rendering debug information
        5. Finishing the rendering code
        6. Handling user input
        7. Animating the player character
        8. Running the game
      3. Entities
        1. Component-based entities
      4. Summary
    11. 4. Adding Sound
      1. DirectSound versus XAudio2
      2. The basics of sound
      3. Stereo sound
      4. DirectSound
        1. Volume control
        2. Frequency control
        3. Pan control
      5. XAudio2
        1. Volume control
        2. Frequency control
        3. Pan control
      6. Summary
    12. 5. Rendering Simple 3D Graphics
      1. The Direct3D graphics rendering pipeline
        1. Input assembler
        2. Vertex shader
        3. Rasterizer
        4. Pixel shader
        5. Output merger
      2. Shaders
      3. Rendering a triangle
        1. Initializing Direct3D
        2. Initializing the shaders
        3. Initializing the scene
        4. Rendering the scene
      4. Rendering a cube
        1. Initializing the depth stencil
        2. Initializing the constant buffers
        3. Initializing the scene
        4. Updating the scene
        5. Rendering the scene
      5. Summary
    13. 6. Where to Go from Here
      1. Culling and clipping
      2. Collision detection
      3. Artificial Intelligence
      4. Physics
      5. Multithreaded programming
      6. Game design
        1. Game difficulty
        2. Manipulating the player's emotions
      7. Further reading
        1. Websites
        2. Books
      8. Summary
    14. Index