A Fun Game to Play

The options and setup screen, where players decide which of the eight unique ships they will fly and set game conditions


SpaceWar: A Fun Game to Play

SpaceWar is a simple program that I wrote in the September of my senior year at high school to learn how to program for windows with C++. It's basically your traditional game of space combat in beautifully rendered vector graphics and played to brillaintly harmonious MIDI masterpieces. SpaceWar provides support for up to four players at once on the same computer and sports a variety of different modes of play. More importantly, source code is available!

- August 2001

A Note on the Source Code

SpaceWar was written as a project to simultaneously gain a working knowledge of C++ and of Win32 programming. As one might imagine, some of the source can and will be pretty messy. There are also very few comments - they're just not my style. However, my code is structured well, so if you have any idea of what you're doing, you'll be able to give it a quick look through and start tweaking things in a couple of minutes. For those of you who are complete newbies, I would suggest downloading the simplified version that demonstrates only basic galactic combat functionality. This code was originally intended to be used in a game programming at the end of the year in my C++ class, but unfortunately we ran out of time.

These sources were composed and compiled in Microsoft Visual C++ 6.0, which is, quite simply, the best windows C++ compiler out there. I have made absolutely no effort to make it portable or allow it to compile under other programs. It's just not something I'm interested in doing. That being said, if you are able to alter the project files so that they will compile under, say Borland, please email me a zip of the code and I'll post it on my website so that others of the misguided can benefit from your work. Indeed, if you take this source and do anything interesting with it, I'd love to see it or at least hear about it from you.

NOTE: The main program, space.exe, accepts a command line which is sent by the startup program start.exe. That's the proggy you're going to want to run when you play. If you experience any errors, you've got the source. Fix them yourself.



Download SpaceWar

Download SpaceWar Souce Code

Download the Simplified SpaceWar Souce Code



Player 4 is spontaneously converted into phlogiston




To Shedletsky's Code Library

To the Nexus