Over the last several weeks, I've been focusing on a passion I've had ever since I first laid my hands on the Atari and Nintendo consoles back in the 80s; video game development.
I remember having a blast playing the game Breakout but wasn't sure whether I could muster up the skills necessary to develop it straight out the gate since my professional forte is C#.NET development for business applications rather than game development using C++.
Based on some of the more popular game development sites out there, the general recommendation was to start with very basic games first, such as Tic-Tac-Toe, Blackjack or Connect Four. Get use to these types of event-driven games that take advantage of the basic game loop structure without the necessity for motion, collision detection, sound, state machines, you name it.
So I took to the adventure of creating a GUI-based Tic-Tac-Toe with intelligent AI that holds its own fairly well. This rather mundane game was actually a very valuable experience and pushed me toward my original intent: Breakout. Let me start by saying,
do not skip the easy games if you're thinking about going down the road of game development. It is completely unbelievable how much you learn if you truly take the time to do things right with an object-oriented approach in mind.
While this game is still in development, I've put in a lot of hours on it over the holidays and it is coming together amazingly well. There's still a ton of stuff I want to do with this one, but I've integrated numerous concepts into the game thus far, including physics motion, collision detection, sprite animation, sound effects, time-based frames per second (FPS) cap control, hotkeys, in-game screenshots, event handling, etc...There's a few bugs I'm still working out as I go, but all in all, a very smooth and responsive game so far!
I still have numerous "weapons" left to design and integrate into the playing field, along with a fully functional state machine so that I can present menu systems prior to the game starting, but I wanted to share what I had, as I'm very pleased with the results.
You'll notice in the above screenshots that there is a funny little cluster of red balls. They are actually animated as they fall. That is my "multi-ball" weapon. If you manage to catch it with the paddle before it falls into oblivion, you get a nice spray of 6 balls that shoot out of the paddle. I currently have only this weapon but more will be coming soon. As of now, the weapon is assigned randomly to approximately 5% of the bricks for a given level. I'm still playing with figures.
Speaking of levels, another one of the most impressive features of the game is the light-weight level editor concept. You can create your own levels with a simple array of numbers in notepad. It currently supports 5 different colored bricks, each of which has a different internal strength (i.e. number of hits that it can sustain before going
poof).
Since I'm sure some of my readers will ask that I provide more specifics on the development tools I use at home, here's the list: Mac OS X Leopard 10.5.5, XCode 3.1.2, SVN 1.4.4, C++, SDL 1.2. The cool thing is that C++ & SDL are cross-platform so there's not too much effort involved in creating a Windows or Linux port of my games down the road.
For those of you out there thinking about developing some of your own games, feel free to leave a comment if you have any basic questions that I might be able to help with.
Cheers,
Chris