Game Programming for Beginners

iDevGames Jan 10, 2013

Brief Reality Check

So you want to make games, eh? Prepare yourself; It’s a long and arduous journey.

Every budding game developer’s adventure starts off with an idea of a game they’d like to make. “It’ll have some monsters inside of a dark and creepy 3d haunted house and the player just has to avoid them and find the way out. It’ll be really simple.” Little do most newbies know, few game ideas are ever “simple.” It’s a mistake to think that just because something is common, that it must easy. Sure, almost every first person shooter video game on the market has rocket launchers, jump pads, elevators, and vehicles, but it’s definitely not easy to make those things.

You might say, “Yeah, but I just want to make a game like Mario. It can’t be that hard.” Despite having a genesis over 25 years ago, even 2D platformer games are difficult to make. Ask any game developer who has made or has tried to make one, and you’ll “war stories” about post-midnight coding madness of trying to make the subtlties of player movement and collision work correctly. Even though it seems simple from a gamer’s perspective, from a game developer’s perspective, there’s a multitude of processes that must be carefully and correctly crafted to make a game.

If there’s just one thing you need to know before beginning to learn how to make games, it’s this:

Creating games takes a lot of time and effort!

Having the Right Idea

When you think you’re finally ready to create a game, or to start your journey in game development, the first problem you’ll encounter is come up with a good idea. All too often the first ideas that come up are copies of the current state of the games. The idea here is to stay with your feet on the ground.

You either fall into 2 categories:

a) you’re a complete beginner with little or no programming experience

In this case, start simple. If you browse the forums, you’ll often see veteran game developers tell newcomers to start off by making Pong, instead of the idea the really want to persue. The suggestion is not an insult, it’s a proven strategy. When you start off, try to copy an old school game like Pac Man, Missile Command, or perhaps a simple board game like checkers. The simpler your first game is, the greater your chances of success. You will also be surprised at how much you will learn from a Pong clone, and how much of what you will learn will apply to games substantially more complex.

b) you’re an expericed programmer or have at least read a book about C

When you already know what programming is all about then it’s a little easier for you to get started on the more advanced games. Even when you are an experienced programmer, it doesn’t hurt to start off simple just to get to the feeling of how programming games differs from applications or web development. In some cases you may even want to learn a new language.

Where to Start

After you have an idea for your game, the next step is to decide how you will approach creating your game. There are more or less, two approaches:

  1. Program it all yourself
  2. Leverage an existing game “engine” or “builder”

Game Engines

A common mistake new game developers make is that they think “game engines” are essentially magical programs where you just add in your own graphics, change a few lines of code, and like skinning a web forum, voila! You have your game! This just isn’t true. The term “game engine” is so widely used and misused, it really has no concrete meaning. An indie game developer can come up with a “game engine” in a few weeks, and then there are professional AAA game engines in the industry that take teams of programmers years to write.

However, at their core they all tend to do the same things. A game engine is a collection of code, possibly from multiple sources, crafted to work together to handle the basic elements that almost all games need. Those elements tend to be: graphics rendering (2d or 3d), physics (collision detection and response), player input (handling keyboard and mouse events), and potentially other things such as networking, menus, high scores, and more. Game engines which handle a lot of that busy work for you, can definitely save you a lot of time and effort when creating your game, but don’t be fooled into thinking that it still won’t take a lot of time and effort to utilize that game engine.

Game Builders

Game “builders” are a different breed from game engines. Game builders tend to be what most new game developers think a game engine is. In other words, typically with game builders you do just slap in some graphics, write a few lines of simple scripts, click some checkboxes and change some settings to add some behaviors, and you click a magical “Build” button and your game is done. Game builders can be a good way for very young kids to make games and foster their creativity, but the very process which makes them fast and easy, makes them inflexible and limited.

Programming from Scratch

Many game developers like to “start from scratch” and build a game from the ground up, doing (almost) everything themselves. This is a fantastic way to learn about game development and programming in general. To go at from this direction, the first thing you’ll need to do is pick a programming language.


uDevGames 2011

Convergence — Best Gameplay
Flying Sweeden — Best Graphics, Most Original
Time Goat — Best Story