Video games are a fun, addictive and exciting form of entertainment. But how do they work?
Rule Number One: Beauty is Only Skin DeepEdit
Graphics and audio are probably the first things that most people notice when they play a video game. And many games do, indeed, depend on cutting-edge graphics and compelling musical scores to attract a large audience of potential customers. But gorgeous cinematics and immersive sound effects are only the outer-most layer of this deep and fascinating form of technology. Behind all of the flash and bang of fancy special effects lies an intricate structure of logic and numbers.
Enter the ProgrammerEdit
Before a computer can do anything, whether it's sending an email, browsing a web site, or unleashing a horde of flesh-hungry zombies, it must be told how to carry out its task by someone who knows how to communicate with it. That someone is a programmer, and it is their job to write instructions in a special type of language known as a programming language. Programming languages are special because, unlike English, or Russian, or Japanese, they can be translated into a language that the computer understands: binary, or machine language. A complete set of instructions informing a computer how to carry out a specific task or a group of related tasks is known as a program.
Get in the GameEdit
Game programming is a special type of computer programming directed specifically toward the creation of video games. It really isn't any different from any other type of programming as far as its methods go. Where it differs from other types of programming is in the types of tasks that it is expected to perform. And that is a lot!
As a game programmer, you will have to learn how to write programs that quickly and efficiently render 2D and 3D graphics to the screen, stream music and sound effects, calculate realistic physics, determine non-player character AI, and get input from the user all at 60+ frames per second. If you are writing a multiplayer game that can be played over a network, you will also have to write network code and give some thought to network security. If all this seems daunting, you're right! Programming video games is no walk in the park. But don't worry: you don't have to do this alone.
Tools of the TradeEdit
The truth is, many of these tasks have already been done for you. Collections of program code called libraries can be freely downloaded and used in your own applications. These libraries have been designed to handle specific programming tasks, such as displaying graphics, streaming sound, or retrieving input from a user and have usually been extensively tested and optimized. Other code resources, known as APIs, or Application Programming Interfaces, can also be put to work. APIs simplify interaction between your program and the underlying hardware, or another application, like an operating system. All of this high-quality free code certainly makes your job as a programmer a lot easier!
In addition to libraries and APIs, there are many excellent tools available that can greatly simplify many complex tasks. Why write a program that can create 3D models when you could just use an existing 3D modeler like Blender, 3ds Max, or Maya? Need to create high-quality textures? You certainly wouldn't think of writing your own image-editing software when you have PhotoShop and The GIMP right at your fingertips. Even old staples of custom, in-house programming like physics and rendering engines can now be licensed and put to work for you with a little effort on your part. These days, a big part of being a successful game programmer is knowing what to do yourself, and what to borrow from others.
So what then, is game programming? These days, a big part of game programming consists of learning about the tools that are already available to you and understanding how to combine them into a game that is both original and fun to play. But don't think you don't have your work cut out for you! Even with all of the resources available to you, gamers' expectations continue to rise and don't show any signs of abating. Level editors, AI, scripting, and gameplay are all areas where much of the work is going to have to depend on your own creativity and ingenuity. Are you ready?
Next: How do I get Started?