Getting Started Guide

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

Contents

Introduction

It seems there are a lot of new people looking to get into game development on gpwiki nowadays. Some of them have a programming background but many do not. If you're an absolute beginner it can be tough. What compiler should I use? How do I make (insert game name here)? What's the best programming language? How do I get started?

Although some people may give you straight answers to those questions, the truth is there is no single answer. Like many issues in life there are a lot of paths you can take to get to where you want to go. Hopefully this article will give you a better hint on what you can do to become a game programmer.

Let me start by answering the common questions posted above.

What is the best programming language?

The answer to this question is that no programming language is the best. All of them have some trade-offs, to learn more about which one is right for you check out this page (http://gpwiki.org/index.php/Languages). I personally have chosen C++ as my main programming language, as C++ is a superset of C and therefore has access to the large library of C game specific API's, most notably SDL and OpenGL, with the added benefit of being an Object Orientated language. It is also the most common for game development right now so there is a huge wealth of information on the subject. Like I said earlier however, choose something that suits you. C++ may suit me but for others it might be too complex or not to their liking.

How do I make (insert game name here)?

Most of the games on the market today are made by professionals with a large team of programmers. If you're looking to make the next big mmo or fps then think again. Start simple, make a 2D game of something that was on the NES. Why do I say the NES? Well most of those games had very few people working on them and they were very simple games compared to todays standards. Once you feel you can conquer the 2D games and you feel you want more of a challenge then go 3D.

What compiler should I use?

This depends on the language that you have chosen. Languages like java, python and C#/VB.net/Boo give very little choice or only one option. Do some research, ask around on a certain language.

How do I get started?

This is a vague question and like I said earlier there is not one single solution. I can give you hints that will help you however.

First step I would take is to learn a certain language. Don't jump into making a graphical game yet, just get a good book and learn the syntax. Common algorithms on how to do things like: reading from a file, getting input from the user, the use of functions and other things to that nature.

Second step I would take is to make a simple graphical demo. Note that this is not a game but rather part of a game. For example a good demo might be to make a sprite (2D graphic) that moves across the screen given the players input.

Third step I would take is to make a simple full fledged 2d game. Something from the NES would be good to start out with. Maybe tetris or mario or just a game that has all the elements to a full game. If you have no idea on how to create a 2d game engine or just want to look at what others have done then you can read my article series about creating a 2d game engine here (http://www.gpwiki.org/index.php/SDL:Tutorials:Complete_2D_Engine_Overview).

Fourth step I would take is to make a 3d game. I would start out using a pre-made 3d engine such as ogre3d or irrlicht. Try to get something that works similarly to your 2d game in terms of functionality. When you feel you have this down then try making your own 3d engine or explore other fields. After this point you should have more of an idea on what you want to do.

Conclusion

Please know that this process takes a long time to learn. It's not something you can just jump into and learn everything there is to know in a few weeks, months or even years. Expect to spend atleast a few years learning the basics. If you don't feel this commited to learning game programming then you might want to try something else in the game related field like art or story design, not to say that these are easy but you might be better in those fields naturally. Good luck in your steps to learning game programming.