Development Post Mortem January 2003.
The original idea for PD came whilst driving home from a wedding. It was one of those really simple and obvious but potentially good game ideas that you can't wait to get working on. A basic playable version was up and running within a day, and it was obvious that the game had a lot of potential. The main reason I was able to get a test-bed up and running so quick, was the existence of a very stable and modular engine. My game engine (which is sadly nameless, lets call it the 'jadzia' engine) has been used over a period of years in a number of my games, all of them 2D, and is based on DirectX7. Keeping the game code completely separate from the stable, bug-tested engine in its own lib file meant for much faster development than trying to do everything at once.
The biggest problems in developing PD were mainly ones of game design. Although the basic idea (Planet in middle of scrolling world, fire missiles to shoot down enemy missiles before your cities are destroyed) sounded fun, the problem is to include enough variety to keep the player interested enough to actually buy the game. I added a number of features to enhance the gameplay, some of them (like different types of rockets) didn't make much difference, others (like placing bases and cities on orbiting moons) made for definite improvements in the games depth. As always a fine line was being walked between keeping the game simple enough to play straight away and making it deep enough to keep people interested.
As well as making the game casual-gamer friendly, another concern was to keep the download size small, both to appeal to 56k modem users (like many casual gamers) and to reduce the bandwidth costs of hosting the file myself when I sold a shareware version. Initially I set my goal to be under 1MB, which turned out to be insanely optimistic. The final shipped game was 1.2MB, but it got bundled with a 6MB RealArcade installer, totally defeating the objective. In addition, the lack of texture variety and no music was unpopular with some beta testers, and I later released an updated version weighing in at 3MB.
The sound effects for Planetary defense were quite simple, being purchased from sounddogs.com, my regular supplier for game content, and very affordable. The music was a tough choice and even now I'm not sure I really like it, especially annoying as music files make up such a huge chunk of the download size. It can be very difficult to listen to the same game loop 100 times without it bugging you, and loops where the only option that would keep filesizes reasonable. The artwork was all done by me, and although I'm no artist I ended up very pleased with the results. This is far from my first space game, so I've learned a few tricks and tips on how to do planets, space nebulae etc. All of the sprites were rotated and scaled using D3D. There are no texture-pages in the game, only simple small bitmaps in dds format to make use of variable alpha (or 1 bit alpha where possible, for space reasons).
The technical highlight of PD is probably its particle system. This is the culmination of many years of working on particles under Directx7 and is highly optimised. Despite all the optimisations, the system does throw out a lot of sprites and is by far the biggest chunk of the games processing time. PD has pretty simple physics, and pretty basic AI, the majority of the code effort is in the particle system and the GUI. The star system and backdrop tile engine are almost identical to the code from an earlier game (StarLines INC). The sound system is very simple and hasn't changed in years. The general game structure is highly class based and makes heavy use of singletons and STL containers.
Originally my plan was for the game to be completed in 3 months or less, but this eventually span out to almost 6 months. Towards the end of the project I had to change the name from defence to defense (the American spelling) and also go through the process of getting the games text translated into French,Italian Spanish and German, which eventually turned out to be quite simple. The biggest translation problem was rejigging all my dialogs and help screens to accommodate the longer languages (like German). Thankfully I had learned from previous games to make sure all of my games text was stored in an external text file (although this was my first game to be translated), and I already had a handy library class for loading my strings in and accessing them. Completely different string tables were used for each language, with the string loader taking care of handing over the right one. A single executable detects the OS language and selects the right table.
Another last minute addition was the 'upsell' system at the games end which plays 'demos' of some of the later levels. I couldn't store video files (too big) so had to incorporate a system which would replay parts of a game from stored data. In the end the system was workable but not perfect, I had a system which would let me hit a key at an exciting moment and save out the current game state, but the particle state wasn't saved, so the game replays don't have any particles onscreen at the start. Nonetheless, including the system was worthwhile and I'm sure it helps to turn players into buyers. With hindsight it was probably too late in the development cycle to start thinking about making the game state saveable (there is no other save game facility as the games themselves are 5 minutes or shorter).
The games initial release through RealGames was accompanied by a fairly good review in PC Gamer in the UK, which reviewed it higher than The Lord of The Rings game in the same issue (a pity it didn't get a 2 page review like the former...). A short while after initial release, the updated version (with varying planet textures, more levels and meteors/radar station) was released which should help sales, and a few days ago the game went on sale as shareware. As a side project, a small experiment was made in using animated sprites instead of particles for some of the explosions. In the end I didn't like the results, but ended up releasing some explosion texture pages, and eventually releasing the configurable explosion generator as a freeware app at the following URL which generated quite a bit of attention in the game developer community.
Hope this post mortem was an interesting read, and don't forget to try the game. Click here!
What Went Right: