Pitfalls in Game Programming

A glass can take 100cl of any liquid. It currently contains 50cl of water. Would you describe the glass as half full or half empty? Pause and hold that thought until you finish reading this article. And yes, you’re still going to be reading about the software development of video games also known as game programming.

For the reader’s better understanding, it is necessary to mention that game programming is not the same as other types of programming. The essence of playing a game in the very sense of the word is interaction.

Most online games, if not all would require you to interface, collaborate and communicate with other players in the course of playing the game. This is why game programming in particular requires at least one

or more of the following skills: simulation, audio programming, artificial intelligence, database programming, network programming and computer graphics.Can you imagine a game that is scaled to include up to 1000 players across different time zones all playing online at the same time?

Also imagine the players can assume the role of a character in a fantasy based land, say Star Wars. Now imagine you are the programmer tasked with programming this game. It does sound like a tall order right? Yet, while this may sound daunting for some programmers, some may regard it as ‘cool’.

No matter where you belong, there are techniques to make your next game development easier and faster.

First and foremost, see the big picture. Figure out what you want to build and develop a detailed design for it. You can liken yourself to architects building a house. They need to list the tiny and specific details of the building;

its layout, features, specific building components and a heap of other resources and patterns before starting on the building project. It is virtually impossible for them to lay a single brick without having a detailed design of the proposed building.

Similarly, a game developer will have it tough without first having a solid detailed design of the game. Avoid writing a single line of code until you have your design.Your design will give you an overview of what is required to start and finish

the game. You’ll be able to see possible mistakes in your idea. It will stop you from being impulsive in the middle of development. As you work on the game, you won’t be tempted to just make things up.Don’t misunderstand. It is okay to change and add to your design

but all the components must work well together.Most importantly, the design will give you a complete list of specific things you need to do to finish the game.Bear in mind the level of detail a real design requires. Think of every possible detail and write about it.

A computer needs to have every detail itemized. If you don’t program a specific detail, it won’t materialize.The more detail you include the better your game will be. Having a clear picture of what the game will entail is one of the most important concerns a game developer should have.

Define an appropriate scope for the project. Ask yourself these questions: what kinds of resources are required to finish the game? Which of these resources are available at their desired levels? How large and how complex is the project at hand? You should answer these questions before you continue with your project. Required resources should include every item from money, programming skills, graphics design skills, computers, servers and related equipment to time and workspace. These will have a direct impact on the size and complexity of the project. The more complex the game, the more complex the resources needed. The simpler the game, the simpler the resources. This is why simpler games (e.g. a version of the PONG game) require much less time and resources to make. Learning point? Know what you can realistically achieve. Avoid taking on an impossible workload. Do not take on more than you can chew!

Know your onions before you start on the development. There is nothing more frustrating for a programmer than to be faced with an unfamiliar programming language. Just like a novelist writing a 1000-page novel in French must understand the language to write a compelling story, a game programmer must learn and understand the game’s core language. This will help you avoid quitting. A sound knowledge of the programming language of choice is as important as having the required resources.

Focus on a target audience. Make the game for your target audience not yourself (except of course you have the money and time to burn). Pay attention to the features your users want. What attributes of the game keep them fascinated? Why are they glued to it? Place your emphasis on these features. Players enjoy being immersed in a game’s world. The game’s imaginary world should come alive in their minds. If features in the game distract them, they won’t be fully involved with the characters and situations.

Always back up your work all the time. This is a golden rule that should never be overlooked. It cannot be overrated! I do not even want you to imagine that you forgot to back up your work. A million lines of code gone in an instant sounds outrageous? The truth is it can happen to anyone. Make sure you back up your work several times daily on a tape, a CD-ROM, a ZIP disk or a remote server.

The longest journey started with a single step. Start simple. Stick to what you know. Be open-minded and flexible with your ideas. Do your research. Engage in careful planning and don’t be over ambitious. You might not finish the game with all the ideas you started with. Games progress through development. Be realistic with your choices. Set achievable goals. Watch yourself win at game programming.

It is time to answer my initial question. Is the glass half full or half empty?