![]() |
| Yellow Man | Navigate | BSP Maze | Glide Missile Command | OpenGL Missile Command |
This version of missile command is a hell of a lot more structured than my OpenGL version. I wrote this program in the Summer of 99 for a programming contest that VooDoo Extreme was having. When all was said and done I got T-Shirt, a mouse pad, and a hat (All with 3dfx logos on them).
Just like the other programs, press ESC to quit.
Oh yeah, this is also my first attempt at DirectX programming. As a result, I don't think you can run this one in NT. It should work in other Win32 environments though. You will also need Glide 3, or an emulator to run it.
I guess an easy way for me to explain the program in more detail is just to print the readme.txt file that comes with it.
------------------------------------------
I decided to programme this program when I was reading VoodooExtreme (just like a good boy should), and I noticed that they had a Glide3 tutorial and a contest.
My original version of missile command was in OpenGL. I want to see how easy, or hard, it is to port my OpenGL code to Glide3 code. I have never done Glide programming before, and the OpenGL version of Missile Command was my first game program. So this, soon to be, Glide Missile Command is not only a game conversion; it's a test to see how intuitive glide is to port to. This file is a general programming log file; to see my comments on Glide read glide.txt.
Since this code has a chance of being in public view, I decided to clean up my old code quite a bit. I will also try to use consistent notation, thurough documentation, and other morally imperative programming techniques. McConnell's book was a great help to me on the matter of style.
The Message Dispatch style I use is from a Ray Duncan "Power Programming" article in PC Magazine (I fist saw its use in MFC programming, and saw it used effectively by Boling (Boling 16)).
So, without further ado, it's ~= 4PM on 24 June 1999, and it's time to learn Glide3.
Mark Carlson
mark.carlson@ieee.org
www.brewmeister.net
///////Compiler Settings (VC++6)//////////
LINK: glide3x.lib dinput.lib dxguid.lib dsound.lib winmm.lib
DEFINE: __MSC__
//////////////////////////////////////////
NOTES AS I WORK:
I can't seem to show the window's mouse cursor on the screen, so I'm going to try learning DirectInput and use it to create my own mouse cursor.
I'm trying to follow the rules in "Large Scale C++ Software Design" by John Lakos. If this works out I can use this project as a base for other games.
I decided to go with constant color and iterated blending.
Took about a two-week break.
Implementing DirectSound. I already got DirectInput working. I still have to use windows messages for my timer. DirectX seems to be the hardest part of this project, Glide was easy, and I'm done with that (see glide.txt for details). It was scary easy.
DirectX is much easier if I think of it as simple COM programming. The Help file that comes with it is crap, I found another source for DirectSound (Clark).
3DSound works, thanks largely to the Clark article. I tried a couple times before to learn DirectSound and gave up, but this article really explained it in terms that I could understand.
Throughout my code I am returning (int) on functions that could be void. I use this style so I easily add error detection and correction is the mood catches me.
The Package Style (Lakos) is working quite well, after I got the hang of it my code has been much more easy to manage. One trick to it is using the 'Find In Files...' command in MSDevStu and searching for package prefixes.
Just set up an initialization dialog box to choose sound before the game starts. I had to look back at Petzold (chapter 11).
Programmed Min/maximize window functionality so alt-tab will work.
Made Icons.
///////////////////////////
Bibliography
Boling, Douglas. (1998). _Programming_Microsoft_Windows_CE_. Redmond, WA: Microsoft Press.
Clark, Jason. "Exploring DirectX 5.0, Part II: DirectSound Gives Your Apps Advanced 3D Sound." _Microsoft_Systems_Journal_ June 1998: Online Version. [www.microsoft.com/msj/0698/sound/soundtop.htm]
Holub, Allen I. (1990). _COMPILER_DESIGN_IN_C_. Englewood Cliffs, NJ: Prentice-Hall, Inc.
Lakos, John. (1996). _Large-Scale_C++_Software_Design_. Reading, MA: Addison-Wesley Pub. Comp.
McConnell, Steve. (1993). _Code_Complete_. Redmond, WA: Microsoft Press.
Petzold, Charles. (1999). _Programming_Windows_Fifth_Edition_. Redmond, WA: Microsoft Press.