Programmer Books

Game Coding Complete – 4th Edition [PDF]

Game Coding Complete - 4th Edition

How This Book Is Organized

The book is organized into four parts:

What You’ll Need

If you’re a programmer and you’ve had some game programming experience, you’ll be able to follow along nicely. Take a moment to flip through the pages, and you’ll see this book is written for programmers. Nonprogrammers could probably get something from the book, too, but there is more code in this book than noncode.

The code is written in C++, Lua, and C#. If you don’t know these languages, you’ll probably struggle a little with the code samples, but I’ll bet you can get enough from the comments and the explanations to get your money’s worth.

All of the code in this book works under Visual Studio 2010, or at least it did when it was copied into Microsoft Word, which is how Rez and I wrote the book. Apologies ahead of time for making no attempt whatsoever to make sure the code worked in other compilers like CodeWarrior or GNU C++. I hope you’ll forgive us. We figured our time would be better spent by covering as much technical ground as possible, instead of working on multicompiler–compatible code.

The Lua code was written using the Decoda IDE. Since Lua isn’t a compiled language, you don’t have to use any special editor; Notepad will work just fine. However, there is a DEPROJ file included with the Lua scripts so if you happen to use Decoda,
the project is all laid out for you.

The code in this book also has a heavy Windows bias. I’m a Windows programmer, and I was a DOS programmer before that. I’ve had some brief forays into UNIX on the Ultima Online server code, but I’m hardly an expert. Much of the code in this book assumes that you are using Windows, and I didn’t change the code to support cross-compiling into other operating systems for much the same reason as I chose a single compiler. It was simply better for me to cover lots of technical issues than for me to check my code under LINUX.

As far as graphics APIs are concerned, I assume you’ll use DirectX 11 or later. The code supports both Direct3D 9 and Direct3D 11, but only Direct3D 11 is covered in the book. I don’t have anything against OpenGL, of course, but I’m just not an expert in the nuances of it. Basically, if you have a good working knowledge of C++, C#, Windows, and a passing knowledge of DirectX, you’ll be fine. You don’t have to be godlike in your skill, but you should be pretty comfortable coding in these areas.

If you are a complete newbie and perhaps only know a little C++, don’t feel dejected and don’t return this book! I have a plan for you. Throughout this book, I’ll refer to other tomes of knowledge that helped me learn how to program. They can help you, too, and you can use them in conjunction with the humble collection of knowledge you hold in your hands. With a little concentration, you can bootstrap yourself into programming prowess. I learned more about programming in C++, DirectX, and Windows by looking at working code, of which there is plenty included in these pages for you to enjoy.


You can also get this PDF by using our Android Mobile App directly: