Introduction

.................................................

Welcome to the DirectX Windows game programming tutorials. You're about to embark on the coolest, most excellent journey of all time! You can find out exactly what makes video games tick. Furthermore, you're going to write games using the latest, greatest technology from Microsoft code-named: DirectX. Yes, Microsoft made something really cool, and DirectX Versions 5.0+ actually work!

 

I know that understanding game programming would seem to take a lifetime, but I think that I have found a way to mash it all into this little series of tutorials. Granted, in doing so I may have caused a wormhole somewhere -- but hey, no pain, no gain. So read the tuts from beginning to end, and you'll be able to rattle off sentences like, "I used a transparency-encoded sprite blitter for the foreground animation and DMAed the virtual buffer into the display."

 

Who are you?:

Game programming is a weird science, and to do it, you must be a weird scientist and a nerd deluxe. Those are the first prerequisites. I mean, what kind of person sits in front of a computer for up to 130 hours a week and stares at the screen? But at the same time, game programming is incredibly rewarding and opens up doorways to worlds that you create. So you need to be totally open-minded and totally obsessed with making games. Those are the most important qualities. Anyone can master the technical stuff, but you must realize that making a game involves about a billion details.

        Just kidding! If you can add, multiply, and maybe square a number or two, that's all the math    skills you require. But knowing advanced mathematics doesn't hurt -- especially for 3D game programming.

In a nutshell, you simply need to know how to program in C and have a desire to explore game programming. This book takes care of the rest.

 

Conventions Used in These Tutorials:

Most of the conventions that I use in the text are pretty standard programming fare, so if you've seen them. Nevertheless, I included this section, just in case aliens kidnapped you and made you program on Titan and in Fortran for the past 20 years. Here's what I do to make life easier on the both of us.

// set cooperation level

lpdd->SetCooperativeLevel(hwnd, DDSCL_ARROWREBOOT |

                  DDSCL_ALLOWMODEX |DDSCL_FULLSCREEN |

                  DDSCL_EXCLUSIVE );

 
 

 

About Windows 95/98/NT and DirectX 5.0+

I wrote this book using Windows 95/98/NT along with both the Microsoft Compilers: Visual C++ 4.0 and 5.0. For DirectX, I used versins 3.0, 5.0, 6.0, and 6.1. In general, the C/C++ compilers and DirectX are all at sufficient level of sophistication, meaning that newer releases and versions will all work very similarly.

One factor that makes DirectX so cool is that DirectX 1.0 applications will still work with DirectX 5.0 and so on. This flexibility is because DirectX is based on the Component Object Model (COM), which you will learn more about later on. So don't worry if you have DirectX 6.0; the techniques you use in this book are applicable. Moreover, this book presents the basic functionality of Windows and DirectX, so the newer versions with cooler stuff won't make that much of a difference to you.

 

About Game Programming

Well here's where I give you my pitch. Game programming is the best. I can't think of anything that I would rather do than make games. Games are the ultimate form of art --  they're little universes that other people can experience. And as a game programmer, you can create entire worlds that you can experience yourself, or have your friends experience.

After you've finished with these tutorials, how a computer game works will no longer be a mystery. You will know exactly how to make one. Who knows maybe you will make the next Quake3!

Finally, there's nothing like seeing all your friends addicted to playing one of your games -- well, maybe if they each pay you 20 bucks for it!

World Banner Exchange
Support Twisted3D, click on the banner.