Buy Used
Used - Good See details
$2.00 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Beginning 3D Game Programming
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Beginning 3D Game Programming [Paperback]

Tom Miller (Author)
2.7 out of 5 stars  See all reviews (12 customer reviews)


Available from these sellers.


Formats

Amazon Price New from Used from
Paperback --  

Book Description

December 13, 2004

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.


Customers Who Bought This Item Also Bought


Editorial Reviews

About the Author

Beginning 3D Game Programming

Beginning 3D Game Programming

About the Author

Tom Miller is the designer and development lead for the Managed DirectX API. He has worked at Microsoft since 1997 where he started on the Visual Basic team before his love of games and game programming took him to the DirectX team. He has been with the DirectX team since late 1999, and has worked to bring the DirectX API (and game programming in general) to a wider audience. He has also written the definitive book on the Managed DirectX libraries to date.


Excerpt. © Reprinted by permission. All rights reserved.

Introduction

Introduction

So You Want to be a Game Developer

Just about every developer I've ever met has at one time or another wanted to be involved in game development. Video games are more than just an idle interest to most: they can be a downright obsession. People become immersed in these virtual worlds and often begin to fantasize about creating such rich fantasy lands themselves.

Don't be fooled by the pretty graphics, the wonderful stories, and the moving musical score. Writing a game is hard work, and it takes a special type of developer to be successful. Aside from the obvious technical talent required, a good game developer should possess other intangibles, such as actually being a gamer. It's not impossible to write great games as a nongamer, but it certainly makes the job more challenging.

Becoming a game developer is certainly no easy task either. Virtually no game development company will hire you without experience, and it's hard to get experience when no one will hire you. There are a few courses and even some schools dedicated to teaching game development. However, the best way to get your foot in the door is to make a demo reel. It shows the prospective employer what you are capable of doing and how you go about doing it.

Reading this book will get you well on your way to producing a compelling demo reel.

Who Should Read This Book?

The most common question I'm asked is why anyone would want to write a game using the .NET framework. Other questions include, "Isn't that just for web server applications?" "Isn't it slow?" These are naturally important questions to the game developer (or prospective game developer, as the case may be), but they come from misconceptions about what the .NET framework is.

The .NET framework is not the latest version of the web server, nor is it an extension of any of the server components. It is certainly true that you can create powerful web server applications using the .NET framework; however, there is so much more. It includes a capable client-side Application Programming Interface (API), and with the release of Managed DirectX, virtually the entire DirectX API is now exposed to the .NET developers. It opens up an entirely new array of applications that can be written, including games. To think the .NET framework limits you to server applications is somewhat naïve. It can produce complex client-side applications as well.

The lingering question of performance still remains, and it's not one that I can simply write off. Anytime a "new" language or runtime is introduced, developers are naturally hesitant to adopt it. It wasn't long ago that many games were still written in Assembly because the game developers didn't believe that the C or C++ language was fast enough to do the things they needed to do. The .NET framework is no exception to this rule. Until someone actually proves the performance of the .NET framework, the game developers will look at it with a suspicious eye. Throughout this book are a number of games developed using the .NET runtime exclusively. It's been said that actions speak louder than words, so rather than speak at length about how the performance of the .NET runtime compares to the native world, I let the real-world games in this book make the point.

Why Would I Want to Use the .NET Framework

Anyone who's ever written Windows programs both with and without the .NET Framework recognizes the difficulties of writing even simple Windows applications using the Win32 API. The .NET framework was designed to provide a simpler way to do the common things you need to do in a Windows program and to eliminate many of the things that the average developer doesn't want to worry about, such as memory management.

With developers freed from some of the more mundane tasks, such as spending three days trying to track down a memory leak bug, they can actually add features to the games they are writing. Too many times, great features are cut from a game because of the amount of time dedicated to solving problems that the .NET framework solves for you.

Another interesting feature of the .NET framework is that it is language agnostic. As long as the features being used are Common Language Specification (CLS) compliant, any language that can use CLS-compliant features will work. In the past, the developer who only knew Visual Basic would have a difficult time transitioning to code using strictly C++. Now, the developer using Visual Basic .NET can transition to C# more easily because there are only minor syntax differences between the two languages. The code in this book is written in C#.

Why This Book?

I wrote this book to meet the needs of a development community that has been sorely lacking information on this topic. Too many potential game developers have been turned away because they couldn't find the information they needed. The majority of game development books on the market today cover 2D graphics, which is a nice place to start, but the majority of games written today are fully 3D, and gamers expect that now. It's not that you can't still write a great 2D game, but if that's all you can do, you're limiting yourself needlessly.

This book will not teach you how to write a multimillion-dollar game. This book will give you all the tools and information for you to teach yourself how to develop in-depth, fully 3D games. You will be implementing two complete 3D games during the course of this book, and by the end of this book, you will be able to design and implement your own 3D games and call yourself a game developer. The final game in the book is left as an exercise for you to complete.



Product Details

  • Paperback: 432 pages
  • Publisher: Sams (December 13, 2004)
  • Language: English
  • ISBN-10: 0672326612
  • ISBN-13: 978-0672326615
  • Product Dimensions: 9 x 7.4 x 1 inches
  • Shipping Weight: 1.7 pounds
  • Average Customer Review: 2.7 out of 5 stars  See all reviews (12 customer reviews)
  • Amazon Best Sellers Rank: #296,405 in Books (See Top 100 in Books)

More About the Author

Tom was born in 1975 in Saint Louis Missouri and has worked at Microsoft for over a decade. He specializes in bringing together managed code and gaming. He wrote and supported Managed DirectX and was largely responsible for implementing the XNA Framework. He currently works in Microsoft Studios making games.

 

Customer Reviews

12 Reviews
5 star:
 (3)
4 star:
 (1)
3 star:
 (2)
2 star:
 (1)
1 star:
 (5)
 
 
 
 
 
Average Customer Review
2.7 out of 5 stars (12 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

16 of 16 people found the following review helpful:
5.0 out of 5 stars This is a great beginner's book, November 3, 2005
This review is from: Beginning 3D Game Programming (Paperback)
Let me begin by saying that I went through no less than five DirectX game programming books before checking out Miller's book on a friend's recommendation. Most of those other books (some of them decent) used C++ as their code base - as you'd expect. I spent my entire college career coding C++, so I was no stranger to the language. But I found most of those books difficult to crack. DirectX 3D programming in C++ is just not intuitive for beginners.

Enter Tom Miller's book. You should know I had very little experience programming in C# before I got this book. Now I'm a total convert. Middleware aside, I just don't think there's a faster, more intuitive way to create your own 3D games than using Managed DirectX.

I found Miller's book to be well written, clear, and having a reasonable learning curve. He starts you out slowly, and adds complexity with each game project. Add in the ease of reading and programming in C#, along with the Managed DirectX sample framework, and you're starting out ahead.

That is not to say that Miller's book is perfect. But I found most of the faults lie with Managed DirectX itself (although I suppose Miller should share some of the blame since he's the one creating it :) Because this is "new" technology, the MDX API keeps changing. Your code may not work from one SDK update to the next. Hopefully most of this will settle down with the release of Visual Studio .NET 2005.

If you're having trouble getting the source code on the CD to work, don't fret - it works. But depending on the version of the SDK you have installed, you may have to do some minor massaging of his code, specifically to his main game object. If you're annoyed by this, I don't know what to tell you. A quick Google search and some source code cut-and-paste had his code compiling with minimal effort. And this was when I knew NOTHING about C#, DirectX, the sample framework, or Miller's code.

I was able to create a fairly complex 3D puzzle game in about 4 months. Honestly, it turned out great and exceeded my expectations. And I based my original code on Miller's simplest game example. Granted by the end of development, there was almost nothing left of his original code. But that's what was so great about it - I could make some minor changes, compile, see what happened. Add a new object, compile, see what happened. I got instant feedback through the entire development process, and that made a HUGE difference for me. I never felt like I was programming into a black hole, hoping I'd get workable code at the end.

Again, this book (or Managed DirectX, for that matter) is not perfect. You will have to put in a little effort. But honestly, if you're not willing to put in the effort, why would you be interested in game programming? It's a labor of love, with an emphasis on labor. When it comes right down to it, I just don't think you can do better than this book if you have some programming experience and you'd like to try your hand at creating a 3D game.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


21 of 23 people found the following review helpful:
4.0 out of 5 stars very informative despite all of the errors, May 4, 2005
By 
Keith A. Langer (Somewhere in the United States) - See all my reviews
(REAL NAME)   
This review is from: Beginning 3D Game Programming (Paperback)
This is one of the only books in print which covers Managed DirectX game programming. Many of the other books on DirectX 9 still use C++, leaving those of us who prefer Managed code in the dark. Since Tom Miller is the author of the API, he is one of the best people to introduce you to this material. This book does have quite a few errors, but I still think it's one of the best books around. Despite all of the errata, I'm giving this book four stars because it provides a very comprehensive intro to DirectX 9 and 3D game programming.

If you don't have a good understanding of 3D math, I suggest looking for an additional textbook which covers matrices more comprehensively. Fortunately, DirectX reduces some very ugly matrix multiplication to look like simple math problems and I could see some people using DirectX without knowing much about trigonometry or matrix math.

This book also gave me several realizations:
1) I need a computer and graphics card with Pixel Shader 2.0.
2) I need to become a better artist so I can create my own meshes and skins or I have to pay someone else to be the artist.

In the beginning of the book, several programs are mentioned for creating meshes. In additional to those professional (and therefore expensive) packages, I thought I'd mention a program called MilkShape which only costs $25 to register and does a pretty good job of creating meshes. It exports into many formats, including DirectX.

Unlike Tom's previous book, the code in this book relies on the Sample Framework which ships with this version of DirectX. It does seem to remove some code requirements, but I think it also weighs down the code unnecessarily. I think in some ways it might have been easier to understand the code without the sample framework. The book isn't really a sequel to Tom's other book, but it's more like a repackaging of ideas with a focus on game programming.

The code does compile, but you need to make sure that you have the references to the October 2004 release (v9.02.3900). If you have multiple versions of DirectX, the framework is going to default to the newest version.

I do have to say that I felt the frustration of the previous poster who found the book to be full of errors. There are many incorrect diagrams, many instances of incorrect code, and even a small error in the section on matrix multiplication (a second edition is definitely needed). Fortunately the source code is correct, so you can always look at the code to find the necessary corrections. The book also claims that VB.Net code is provided in the source code, but I could not find it anywhere (it's all in C#). I'm not sure why the code was never translated, but perhaps it was the unsafe code (some of which could have been avoided using Marshal.SizeOf) or perhaps it's because there are many cases where a variable has the same name as a property but with a different case.

In the first project, there is at least one critical line of code that never shows up in the book but is in the source code. Most of the errors relate to references to "device" with need to be replaced with either "e.Device" or "sampleFramework.Device".

In the second project, the author leaves you on your own in the middle of the project to figure out the UI design. Normally I wouldn't have a problem with that, but the UI actually uses some classes which aren't discussed until the ensuing chapters. It would be more helpful if the source code provided an incremental copy of the code for each chapter which shows only what's been done up to that point (rather then just the final result). It would also help if at the end of each chapter you could have a definitive result to compile and display (if only to tell that you haven't missed something). As an aside, the collision detection routine is also less than perfect, since you can make the tank go through some walls as well as off the playing field.

The third project is not a complete game. It is simply a program that's been started and left for the user to finish (so I take issue with the claim on the back of the book that there are three complete games). The source code is no more complete than what's in the book (whereas the first two games are complete in the source code). But it does teach you some really cool stuff about the programmable pipeline, and if I had a card with pixel shader 2.0 I might be able to view it faster than 0.5 frames per second.

I think it would be helpful if the errata were published on line, as well as the source code (for a while I had lost the source code for Tom's previous book and couldn't find it anywhere on line). Tom's blog has some discussions, but I couldn't find errata or source code (nor could I find it on www.samspublishing.com). I've tried sending some comments to him on his blog, but I haven't heard back.

To sum it up, this is a great book despite all of the errors. Kudos to Tom for helping bring DirectX to those of use who want to write games using managed code.




Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


14 of 15 people found the following review helpful:
5.0 out of 5 stars Excellent book covering many topics (see below), March 13, 2005
By 
This review is from: Beginning 3D Game Programming (Paperback)
C# and Managed DX9 are arguably the easiest way to write understandable 3-D code. You don't have to mess with all of the convoluted C++ jargon and strange uses of variables that are initialized after passing them to methods.

I cannot stress enough how useful this book has been in the current game I am working on (a 3-D RTS). The chapters on User Interface and how to write a custom GUI have been particularly useful with where i'm at now.

This book would have also saved me tons of time earlier in the development process as he goes over such simple things as handling device lost states (such as when the user minimizes your game) and how to display an accurate framerate (I wasted tons of time on that last year!).

Tom also shows you how to write networking code to make a multiplayer game as well as how to do things such as have a nice skybox, multiple levels, loading screens, player selection screens, font output, and even the use of Shaders (to make objects shiny). He also shows how to do mesh animation using mesh hierarchies - which is very important if you want your model to be able to have different moving parts that animate (such as for walking).

This book covers a wide breadth of topics that any new programmer to game design will find useful. If you pair it up with his Managed DX9 Kickstart book (which you should read first probably), it will take you to the point where you can write your own framework for just about any game you want to write. It does not cover really advanced topics such as pathfinding algorithms and fancy AI code, but it will give you a broad overview and allow you to write several fun games (I'm especially fond of Blockers).
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews










Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject