You are previewing Beginning 3D Game Programming.
O'Reilly logo
Beginning 3D Game Programming

Book Description

There are many programming hobbyists who write 2D games but there are far fewer that grasp the concepts of 3D programming. Although there are also quite a few ¿game development¿ books on the market, few deal with 3D game development. Those that do are mainly aimed at advanced readers. This book will provide a practical, example driven approach to learning the unique art of 3D Game Development that even the beginner can grasp. It won¿t get bogged down in page after page of boring theory but instead will teach through many interesting hands on examples. Tom Miller brings years and years of 3D game programming to the table and couples that with an engaging writing style to mentor readers in the intricacies of game development. The book starts out with a crash course in game programming concepts and then progresses into developing 3 different types of games with many useful tips, notes, and cautions along the way. This title will serve as a useful guide to either current 2D game developers or programmers that want to learn to program games.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. We Want to Hear from You!
  5. Reader Services
  6. Introduction
  7. Introduction to Microsoft .NET
    1. Game Development and Managed Code
      1. What Is .NET?
      2. What Is Managed Code?
      3. Writing Code with the Microsoft Visual Studio .NET 2003 IDE
      4. Compiling .NET Code on the Command Line
      5. Introducing Game Development
      6. The Developers
      7. The Process
      8. The Tools
      9. Summary
  8. Introducing Graphics, Game 1
    1. Planning Your First Game
      1. Coming Up with the Game Idea
      2. Understanding the Need for a 3D Game
      3. The Specification
      4. Summary
    2. Understanding the Sample Framework
      1. Creating Your Project
      2. Enumerating All Device Options
      3. Summary
    3. Show Something Onscreen!
      1. Creating Your Device
      2. Time to Render
      3. Loading and Rendering a Mesh
      4. Adding a Camera to Your Scene
      5. Summary
    4. Finishing Up the Support Code
      1. Understanding the High-Resolution Timer
      2. Handling Lost Devices
      3. Adding Frame Rate Output
      4. Designing a UI Screen
      5. Designing a Button
      6. Summary
    5. Implementing the User Interface
      1. Designing the Main Menu
      2. Plugging into the Game Engine
      3. Selecting Your Character (Loopy)
      4. Updating the Game Engine with This New Screen
      5. Summary
    6. Implementing the Player and Blocks
      1. Writing the Player Object
      2. Designing the Blocks
      3. Summary
    7. Implementing the Level Object
      1. Implementing the Level
      2. Controlling Player Movement
      3. Handling Level Updates
      4. Summary
    8. Putting the Pieces Together
      1. Including the Player
      2. Hooking Up the Level
      3. Implementing the Quit Screen
      4. Finishing Up
      5. Summary
  9. Basic Math Principles
    1. A Quick 3D-Math Primer
      1. 2D? 3D? What Are You Talking About?
      2. Using These 3D Points
      3. Manipulating 3D Objects
      4. Math Structures
      5. Vectors
      6. Matrices
      7. Summary
  10. Intermediate Graphics, Peer- to-Peer Networking, Game 2
    1. Now Let's Really Get Started
      1. Tankers—The Next Game Idea
      2. Creating the Tankers Project
      3. Getting the Project Rendering
      4. Building an Object Pool for Textures
      5. Summary
    2. Developing a More Advanced User Interface
      1. Using Blockers Base Classes
      2. Adding New Base Classes
      3. Implementing the Main Screen
      4. Rendering Your 3D Model with Your User Interface
      5. Summary
    3. Rendering a Realistic Tank
      1. Understanding a Mesh Hierarchy
      2. Loading a Tank Hierarchy
      3. Rendering a Mesh Hierarchy
      4. Manipulating the Tanks
      5. Tank Properties
      6. Creating the Camera Class
      7. Summary
    4. The Sky? A Level? The Player!
      1. A World Without a Sky Would Be Black
      2. You Have a Sky, but the Tank Can't Drive There
      3. Someone Has to Control the Tanks
      4. IMoveableObject Indeed
      5. A Basic Collision Detection
      6. Summary
    5. Ready. Aim. Fire!
      1. Implementing the Ammunition Class
      2. A Bullets Collection
      3. Finishing Up the Player
      4. Adding Sound
      5. Summary
    6. Playing Alone Isn't Fun
      1. Using DirectPlay
      2. Hosting the Session
      3. Joining the Session
      4. The Event Handlers
      5. Sending and Receiving Data
      6. Summary
    7. Finally, Finishing Tankers
      1. Plugging into the Game Engine
      2. Rendering the Game
      3. Summary
  11. Advanced Graphics, Client/Server Networking, Game 3
    1. Adding Special Effects
      1. Implementing a Basic Particle System
      2. Rendering the Particle System
      3. Putting the Pieces Together
      4. Summary
    2. Building Your Own Game
      1. Formulating the Idea
      2. Creating Your Project
      3. Designing the User Interface
      4. Summary
    3. The Programmable Pipeline
      1. Defining the Programmable Pipeline
      2. Using HLSL
      3. Writing a Vertex Shader
      4. Adding Realism Using Shading
      5. Adding the Pixel Shader
      6. Summary
    4. Controlling the Level of Detail
      1. Simplifying a Mesh
      2. Using a Simplification Mesh
      3. Controlling the Level of Detail Using a Progressive Mesh
      4. Summary
    5. Using Render Targets for Effects
      1. Rendering a Track and Multiple Go-Karts
      2. Creating Render Targets and Surfaces
      3. Rendering a Scene to a Render Target
      4. Displaying the Rear-View Mirror
      5. Summary
    6. Understanding the High-Level Shader Language
      1. Understanding Limits on Older Shader Models
      2. Adding Specular Highlights to Kart
      3. Making Specular Highlights Per Pixel
      4. Summary
    7. Performance Considerations
      1. The Event Model and Managed DirectX
      2. Native Assembly Generation
      3. The Horrors of Boxing
      4. The Speed of Managed DirectX
      5. Understanding the Cost of Methods
      6. Summary
  12. Appendix
    1. Developing a Level Creator
      1. Writing the Level Creator
  13. Index