Tricks of the Windows Game Programming Gurus:Putting It All Together: You God Game!

All ITKnowledge Source Code Search Tips Advanced Search |

| Tricks of the Windows Game Programming Gurus by Andre LaMothe Sams, Macmillan Computer Publishing ISBN: 0672313618 Pub Date: 09/27/99

Search this book:

Previous | Table of Contents | Next

### Playing the Game

Playing Outpost is very simple: you just fly around and blow things up. However, if there was a goal to the game, I would say that it’s to blow up all the outposts.

Here are the controls:

Right arrow, left arrow | Rotate ship
Up arrow | Thrust
Ctrl, spacebar | Fire weapons
H | Toggle tactical information
S | Toggle scanner
Left Alt+right Alt+A | Special
Esc | Exit

### Compiling Outpost

Compiling Outpost is no different than compiling any other demo you have created so far. Figure 14.17 illustrates the components needed to compile and run the project.

Figure 14.17 The software architecture of Outpost.

Take a look in the next sections to see these components in more detail.

#### Compilation Files

Source Files:

`OUTPOST.CPP` | The main game file.
`T3DLIB1.CPP|H` | The first part of the game engine.
`T3DLIB2.CPP|H` | The second part of the game engine.
`T3DLIB3.CPP|H` | The third part of the game engine.

Library Files:

`DDRAW.LIB` | MS DirectDraw.
`DSOUND.LIB` | MS DirectSound.
`DINPUT.LIB` | MS DirectInput.
`WINMM.LIB` | The Win32 Multimedia library extensions.

> Tip: You must include the DirectX library files in your project. Setting the search path is not enough. In addition, you must set the search path to find the DirectX `.H` header files in the DirectX SDK installation directory.

#### Runtime Files

Main `.EXE`:

`OUTPOST.EXE` | This is the main `.EXE` of the game. It can exist anywhere as long as the media directories are under it.

Runtime Media Directories:

`OUTART\` | The sound directory for the game. You need all of it.
`OUTSOUND\` | The sound directory for the game. You need all of it.

And of course, you need the DirectX run-time files on your system. Finally, all the 3D models are in `OUTMODELS\`, so feel free to do what you want with them. But if I see them in a Star Trek movie, I want royalties!

### Epilogue

I’m speechless… Are we really done? Is it really over? Hell no. There’s also Volume II, which covers nothing but 3D information, advanced physics, and really hard math—yumm yumm.

However, the CD that comes with this book has a lot more information about game programming, and even Direct 3D and General 3D. So whether you get Volume II or not, make sure to read all the articles and the small 3D programming cyber-books by Sergei Savchenko and Matthew Ellis contained on the CD. You can find out more about the CD in the table of contents and in Appendix A. In addition, you might want to check out the appendices for some cool stuff about resources, C++, and mathematics.

This book has been the hardest project I have ever put together. It started out as a three-volume set on 3D game programming titled The Necronomicon de Gam, but we decided to do a single book and bring back Tricks. Then, about halfway through the book, we all realized that there was no way it was going to fit into less than 1,500-2,000 pages, so we split it back up into two volumes. In retrospect, I guess I got my way. Everything I wanted to say in this volume and the next is there, with no cuts to save pages, so that’s a good thing. :)

Although there aren’t any plans for another book after Volume II, there are two more areas that I might want to write about: networked games and console game programming. What do you think? I don’t know; the networked game stuff is cool because it’s something that’s applicable to PCs, but console stuff is so expensive. On the other hand, I think it would be cool to cover programming for Playstation I and II, Dreamcast, and Game Boy—don’t you? Maybe I’ll do it, and maybe monkeys will fly out of my butt—you never know.

After these two volumes, you may never see anything more out of me because writing this has been a killer. I worked on these books more than 120 hours a week for around a year non-stop. In the end, I think of the smiles on so many new game programmers’ faces when they first see the glow of the screen and a little blip moving around. That’s the only real satisfaction I get.

I remember when I wrote the first Tricks of the Game Programming Gurus, and how bad it was (I wrote it in two months). Now I think about how exciting it was, though. I was flown to id Software in Texas to talk to John Carmack about DOOM. I also got to hear John Romero rave about Quake. It was unreal, to say the least. I came home and wrote like the wind. I think that book was the catalyst that helped a lot of people discover the possibilities of creating 3D video games.

Although I didn’t cover polygon graphics, texture mapping, or a lot of other topics, that book started me off on this crazy, non-stop roller coaster from hell. And to tell you the truth, I guess I’ve had a good time. Sure beats working at a nine-to-five job! And if there’s one piece of advice that I can give you, it would be this:

When you see a roller coaster, get on it, put your hands in the air, and ride it to the very end. Life doesn’t remember you unless you kick, scream, and claw your way to the top. There is nothing in the world that is impossible. If you believe that you can do it, you will.

Previous | Table of Contents | Next

Copyright © Macmillan Computer Publishing, Inc.

Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.