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
4 comments:
Looks nice! Blog is awesome. Glad your starting to post on this again!
Can you provide the XCode project for this so I can see how you did it?
Thanks!
Hey Robby,
Glad you enjoyed the post! Welcome (back?) to my blog :). I don't currently have plans to make my game open-source, but if you have some conceptual questions, I'd certainly see if I could answer them for you.
I am by no means a pro at this stuff, but I would venture to say that you'll learn more by "doing" than by "seeing" if you know what I mean.
Start simple and small and you'll be able to make a game like this after a smaller one or two! It doesn't hurt to keep the SDL API documentation handy. It also helps to keep a nice big C++ bible nearby if you have one.
'Chris
Yo Chris,
Great blog man, have only 'flicked' through so far, and am loving what I see! Most is over my head, but so was what I know now a year ago!!
<quote who="Chris+Ball" style="smooooth">It also helps to keep a nice big C++ bible nearby if you have one.</quote>
Who needs books when we have 3 major search engines at our hands and a gazillion people who wanna share what they know!
D
:)
hey hi i found this block useful as i met a person doing gr8 in SDL actualy i am doing a project in sdl so i need some help can you provide me you mail id or do reply on my mail id
cdp19388@gmail.com
i hope you will like to help me... plzzzz help neededdd
Post a Comment