• 2D shoot 'em up
SDL2 Rogue tutorial
SDL2 Gunner tutorial
SDL2 Shooter 2 tutorial
SDL2 Widget tutorial
SDL2 Adventure tutorial
The Making Of
Project: Starfighter was a game that, for me, was significant for three very different reasons. The first was that it was the first game I had ever written for Linux. The second was the fact that it was the first game I had ever written using C++ and finally it was the first game I had ever written that was to be licensed under the GNU General Public License. Starfighter was a game that started life on the Amiga but was never finished. It was not unlike the game that Starfighter finally turned out to be either! It still maintained the scrolling X-Y playfield, involved a company called WEAPCO and stared a lone pilot who was attempting to rid the galaxy of said evil empire.
Sadly there are no legacy screenshots of the game that can be shown here. I've started to now make a point of saving images of the games I work on so I can throw them into little post mortems like this one. They make for more entertaining reading!
I had just started doing Java professionally and after about 9 months of this I suddenly got any itching to make another game. The last game I had written was TANX Squadron. The thought of having to use C for programming was a little bit daunting. Java had helped me to understand the concepts of OO developments, the syntax and the overall approach, but having been used to dedicated languages such as AMOS and Blitz Basic, I wasn't too sure about how well I would do. As you can see, I got there in the end, but I'm sure that looking at the code will make most people (including myself) wince!
At the time I started considering it I came across a news posting on Slashdot that discussed the possibilty of using SDL for commercial games. After reading the posting for a bit I discovered this "SDL" was a library for C which allowed easy access to audio, graphics and event handling! Hurrah! This was exactly what I needed! All I needed now was a C compiler and I could begin.
Unfortunately I was still on Windows.
No matter, I downloaded MingGW and after fighting with the exact parameter orders in able to get even one file to compile I was greeted with success. After tinkering for a little longer I managed to get an image on screen and was able to move it around using the keys. No problems. Shortly after getting this working I produced a small demo and uploaded it onto an old Geocities site for people to play. The feedback was very positive, however I was being hassled by people who wanted to source code so they could play it on Linux. I didn't want to share my source code because ... well ... it was mine! And I didn't want people stealing my ideas and my hard work. I would later change my mind.
After the initial feedback I looked into improving and gameplay and adding some missions. The very first demo involved the player fighting against 8 or so enemies. There were no powerups or anything fancy like that. You did have 5 rockets which helped. You had to press Escape to finish playing the demo even after the enemies had all been killed.
Around the same time I found a DVD with a copy of Redhat Linux on it. I decided to give it a go and find out what all the fuss was about. After fighting with the installer and the partitioning, etc (yes, this was a number of years ago, Linux installations are very very easy these days), I got myself a working KDE 2.2 desktop. Wow. I played around with some of the applications available, fired up XMMS to see how that worked and then copied over Project: Starfighter, altered the make file and compiled it. No problems. I then ran it.
After firing a few plasma bolts at the WEAPCO craft the game promptly crashed. What gives? I thought. This didn't happen on Windows. I tried again. It crashed again. I started to get a little suspicious and began going through my code. I discovered a line in the code that was causing an already deleted bullet point to be deleted again. Strange... How come this never crashed on Windows. I found more examples of this amazing programming and fixed them all. After this the game worked fine. Was it bad that Windows let me get away with these issues or that Linux didn't. I'm not sure, but after that the development of the game was moved entirely to Linux.
The Real Demo
I continued to work on Starfighter for some time after that. I put together a proper first mission with objectives and a number of data files and even threw in a title screen with the very same music as was in the original Amiga version! I was pretty pleased with myself having succeeded in writing what I considered to be a pretty good game in C in my first attempt. I put together a few more levels making sure that none of them were the same, to highlight the variation in gameplay I was heading at (you may notice that in the final version of Starfighter there are only a couple of levels that could be really considered to be similar).
I then put in a boss fight for the 5th mission in Spirit. Again I was very pleased with this because there were little things such as a time limit, the ability to destroy bits of the boss ship and it also had the same music that I was planning to use in the Amiga version! I was starting to feel a little bit of nostalga working on the game.
The demo concluded after you won the boss battle and showed a cutscene involving Kline Kethlan, Commander of the WEAPCO Naval Forces. He commented on how amazing it was that Chris Bainfield (the pilot you play as) had managed to take down one of their Frigates in under three minutes, preventing the destruction of Spirit (and thereby causing a supernova). He stated his intention to kill Chris and the demo concluded with a further note that the game would continue to be developed.
With the first [star] system finished I emailed Linux Format and added it to The Linux Game Tomb (www.happypengun.org). I then went away for the weekend to visit some friends. Upon returning I discovered the game had been downloaded more than 650 times over the weekend and my inbox was crammed with people requesting more levels, features, praise and all round goodness. 650 downloads might not sound like a lot but when you're not used to that amount of interest it does make your jaw drop a bit.
The next pleasant surprise was when I was thumbing through a copy of Linux Format and saw a screenshot that, for some reason, looked rather familiar. It took a couple of seconds to sink in that I was staring at a page talking about the Project Starfighter demo. The article's author commented on Parallel Realities, how they used to make games on the Amiga, and gave in depth info on the demo. Amusing aspects of the article discussed the music (or techno) and the fact that the main character had been called Chris Bainfield and not some weird name, like K'Powor Lorav, Ashogwin Ozc, Proog Disselpoof, or something else difficult to pronouce or remember.
It's just better with someone else ...
I never wanted Project: Starfighter to be a game in which you were a lone gunman. Whilst some people have commented that the game reminds of them "The Last Starfighter" I wanted to have more people on your side to help you.
I introduced the player to Phoebe in the second star system, Eyananth, and Ursula in in the third star system, Mordor. The twin girls Phoebe and Ursula, for those who haven't realised (or don't know!), are named after the twins Phoebe and Ursula played by Lisa Kudrow in the TV show Friends. At times during the game they could demonstrate that they could be equally as dopey.
Phoebe and Ursula joined Chris as wingmates and could prove to be useful allies thanks to their moderately powerful craft and the helpful addition of homing missiles! In certain missions they could really help to take some of the heat off the player by diverting enemy attention. I liked having them flying around and contributing to the battle, it gave a sense of being involved in something a little greater than a one man army. Phoebe and Ursula would also banter on the radio to one another about which was doing better at certain times during the game. Another helpful feature of the two wingmates was that it was not possible for them to be killed. Upon their craft being destroyed they would simply eject and be available for the next battle.
There was one subject that the vast majority of emails I received was about and also Googling around websites discovered, and that was that Kline Kethlan causes people a lot of problems.
Kline Kethlan shows up a number of times in the game. His first apperance is directly after the second boss fight. This boss fight is extremely easy which should be enough to give the player plenty of warning that something is not quite right. Kline flies into the scene and opens a dialog with Chris before attacking.
What makes Kline so hard is that he attack pattern is vastly different to anything else you have encountered in the game up to that point! Kline weaves and dodges all over the place whilst at the same time firing direction shots at you (as opposed to the straight shots that most other craft in the game do). In addition to this Kline can use a rocket storm and drop mines!
The very first time I uploaded a version of the game with him in I already had my doubts that the battle was far too hard. I eventually lowered the amount of shield he had, the amount of mines he dropped and how often he did so. From what I can now tell most people find this version a little more acceptable, although there are still the occasional mails about getting stuck on him.
As it goes, Starfighter is a pretty good attempt at a game in C. There sadly wasn't time to do everything in the game that I wanted to do. With most projects you begin to get disheartened after working on them for a long time (18 months is a good bet!) and you begin to itch for something else. Starfighter was supposed to have more missions, an entire extra system, a hidden system, more weapons and more features. One weapon that didn't make it was Shockwave Cannon. This weapon would literally cause all the ships within the vacinity of the explosion to be catapulted in various directions, crashing into each other or being completely destroyed by the initial blast. The weapon wasn't included because I kept on Segfaulting the game, so I gave up(!)
I was planning on a sequel to Starfighter but I wanted to get away from writing the shoot 'em ups for a change and so my next project turned out to be Metal Blob Solid. Still, it seems the game did manage to achieve a small level of cult appeal on the internet and I know a lot of people really enjoyed playing it, which to me was the most important thing.
Total development time : Approx. 18 months Lines of code : ~ 13,500 Number of source files : 58 Size of source code : 358K Number of music tracks : 14 Number of sound effects : 18 Number of images : 176 Size of uncompressed data : 3.7MBs Estimated gameplay time : Around 1 hour