What is game programming
What is game programming
What is game programming? Well, I suppose game programming is a little bit of everything in the computer science world. Programming games is one part science, one part art, and one part fun (most of the time!). Programming games is much different than “normal” programming. Traditional business apps today are largely event-driven programs. In a game, you don’t wait for events. The game has to continually update the screen, check the network, respond to user input, run game logic, play audio, and many more things some 30 to 60 times a second. It’s quite a challenge, especially considering some games run on devices with constrained resources like a smart phone.
If you are really interested in game programming, be warned, it’s a lot of work. It’s hard. But, it’s also very rewarding. There is something unique about watching your users “play” your software as opposed to watching your users “use” your program, so to speak. Anyway, I’ve provided an outline below if your interested in getting started with game programming.
The first thing you need to do is learn a programming language. A game can be programmed in just about any programming language. Some of the more popular ones are:
C/C++ – This is the traditional language (actually they are two distinct languages) used to program high performance games. Most of the AAA commercial games on PC, PS3, XBox, etc are programmed in C++ or C. Many people starting out consider these hard languages to learn and they are also considered the most costly to develop a game with. Check the links below for more information.
Java – Java is a bit easier to learn when compared with C++ but you donâ€™t generally get the same level of performance. I donâ€™t know of a lot of commercial/successful games written in Java, although that may change soon with the proliferation of Android devices. If you are going to write a game on Android your most likely going to be using Java. If you know of any great Java games for the PC let me know! See the following links for more information about Java.
The list goes on: ActionScript for programming Flash games, python, C# (which you can use with the XNA Framework to create games for the XBox 360). Have a look at all of these languages and pick the one that makes the most since to you to start learning.
Data Structures and Algorithms
Next up, you will want to hit Wikipedia (or just search Google) and check out some of these data structures commonly used in video games. If you have taken any computer science classes in college, you most definitively are already comfortable with many of these structures/algorithms. The ones below are fundamental though and you should really get to know them inside and out. As a game programmer you will make use of these over and over again.
You may want to think about some specific skills required in game programming as well. Think about which ones interest you the most or sound like they would be a lot of fun. A few of those skills would be:
- Graphics – This is mostly concerned with getting stuff on the screen. There is a lot to it, especially when you are making 3D games. You have to think about how to store your data so it can be accessed fast when the game is running, how to quickly determine what things on the screen should be drawn, handle lighting, and lots of other things. You even get to write little programs called shaders that run directly on the video card! Graphics programming is a huge topic!
- Physics – This is basically what you think it is. You program the rules that govern your game world. It can get very complicated though, just think about how you would do collision testing if you had 3,000 objects in your game world that all had to be tested against each other!
- Network – Online multiplayer gaming is a huge thing these days and programming it correctly is not easy. Think about the scenario in which you have a server and several clients playing the game. You have to manage security so people can’t cheat, synchronize the game state for all players involved, manage the network bandwidth usage. And this is just a small glimpse into network game programming.
- AI – Again, this one is straight forward. You get to program the brains for the game world “inhabitants”. Just getting an AI character to chase an enemy in a 3D environment is a pretty tough thing to do. How does the AI know where walls are? How does the AI know he can jump to get close to the player? Does the AI know he is low on health and should run away? Oh, the possibilities.
These are subjects people devote their entire careers to and they are not the only sub-disciplines in game programming. Lots of fun stuff there to explore if you’re interested.
The Fun Part
After you have that first game under your belt, you can have a look at the many open source games out there and try and contribute to a project. Heck, before you even finish your first game you should join an online game development community and get to know people. See what they are working on. Have fun, ya know? Check of the TigSource Forums. That’s a great little online community focused on game development that’s very active. Oh yea, I believe the infamous game Minecraft began there as well.
One more thing, don’t be embarrassed by how awesome your programmer art is! Programming games is fun, right?
So again, what is game programming? Glad you asked! Well, finish that first game and if you still like programming games then come back here and let me know!
Here are a few links to some helpful tools and websites:
Visual Studio – You can use to program games in C++, C#, and more. There is a free edition.
Eclipse – Make games with Java (but handles many more langagues).
SDL – Helpful library for graphics, audio, etc so you can focus on your game!
GameDev.Net – Nice game development community.
Gamasutra – Another nice game development community.
XNACreatersClub – For Xbox360 development (although PC, Windows Phone also included).