BannerLeft BannerLeft

 

Beginner Games Programming

So you want to be a games developer? One of the only things better than playing games in my opinion is creating them! Whilst it can be hard work learning to write computer games, it is also incredibly rewarding. How far you go obviously depends on your skills and motivation. You can write games just as a hobby or you can work full time in the games industry. This page explores the options and gives you lots of advice based on my experience of working in the industry and latterly as lecturer teaching games programming.

Is a job in the games industry for me?

Here are a few quick questions to see if you are right to work in games development:

  1. Do you love playing games?
  2. Do you ever wonder how they are made?
  3. Do you often think you could do better?
  4. Are you prepared to work very long hours to get a game finished?

Also some definite reasons not to enter games:

  1. For the money - games developers earn a reasonable salary but it is no better than in other industries. Job security is also often not good.
  2. Just to play games - games developers often have little time to actually play games.
  3. Prestige - while it is cool to see your game on a shelf and reviewed in a magazine this is certainly not enough of a reason to enter games!

Which role is right for me?

First of all you need to determine if your desire is to design game play, create the graphics or to program games. There is a big difference between the three areas The three main roles:

  1. Games Designer - comes up with the game play ideas, perhaps story line etc. Only a very few games designers have the luxury of designing a game from scratch normally you work in a team and are given a game idea that you must then make work. Often the game idea comes from a license owned by the publisher e.g. a film license. During the construction of a game a games designer will work mainly on balancing the game play, writing scripts and testing the game play.
  2. Games Programmer - the programmer actually constructs the game code. This is a full time programming job, normally using C++ and involves the programming of the games' key systems including graphics, world simulation, game play, input, Artificial Intelligence (AI), Physics, User Interface (UI), multiplayer support etc. The programmer normally has no real say in the game play design, game story etc. however they can often contribute with ideas and make things possible through their programming skills.
  3. Games Artist - creates all the art assets for the game. Art assets can include 2D art for 2D games and for User Interface (UI) elements and 3D modelling for 3D games. There is normally quite a lot of artistic freedom allowed here although each game team will have an art lead who makes the final decisions.

Other roles do exist although they tend to be less common and / or only used at certain stages of the game. For example while a large game company may have a Quality Assurance (QA) department most game testers come in toward the end of the game or are employed by dedicated QA companies. Music and sound production roles can exist in large companies but is often out-sourced to specialist companies. Management roles also exist but are usually sourced from within the company.

Are there many jobs available?

The games industry is not a big industry in terms of employees and is therefore difficult to get into. The top four countries in the world for games development are Japan, USA, Canada and the UK (in that order). The UK has about 270 development companies (2008) so you can see it is a small industry. In terms of the roles, good programmers and artists are more sought after than designers.

How can I improve my chances of working in the games industry?

Nowadays you pretty much need a degree to get work in the games industry. This can be a dedicated games degree but does not need to be. If you want to be a programmer a degree in Computer Science or a dedicated Games Programming degree are good however a degree in something like Physics or Maths would also be ideal (combined with good programming skills).

The number one thing for a games programmer is obviously to be able to program! It is obvious but cannot be over stressed - whatever else you know about games is relatively unimportant next to being able to program. Also you must be able to program in C++ to work on top games. There are a few areas where other languages are used but C++ is still the predominant language used in the games industry and will remain so for many years to come.

Dedicated degrees - are they worth it?

You sometimes hear people in the industry criticising dedicated games degrees as not producing good enough graduates for the industry. I think the problem here is that a lot of Universities have jumped on the band wagon and created games' course which are far from ideal. Good courses in the UK include ones offered by Abertay, Hull and Huddersfield.

If you really want to be a games programmer I would recommend you do a games programming degree. I certainly would have done one if they had been around when I was going to University as I am sure I would have got a job in the games industry quicker than I did if I had. Do be really careful not to end up on a poor course though. Unfortunately there are plenty of bad ones around. When looking for a games programming course some things to look out for:

  • Does it mainly teach C++? C++ is still the number one language used in games development so must be taught on the course and should be the main language taught. Languages such as Java and C# are useful to know but should not be the main language.
  • Does the course share many modules with other courses? Courses are normally split into modules covering different topics. Some universities have created courses by simply taking modules from other degrees and maybe adding one or two games modules and calling it games programming. You really want a course where the vast majority of modules are dedicated to games programming.
  • Does the University have game industry connections? Having connections with the games industry allows the course to be correctly tailored to the requirements of the industry, provides speakers and is also useful if you want to do a placement.
  • Is the course accredited? Ideally it should have Skillset accreditation (means it meets the requirements of the games industry) but also look out for BCS accreditation

What about maths?

The amount of mathematics required to program computer games varies a lot depending on what you aim to specialise in. A normal games programmer will have good skills with vectors and basic maths but does not need to be an expert mathematician. If you are wishing to work in graphics then higher maths skills will be needed as they will if you plan on working on physics. It should be noted that the games industry is asking for better maths skills in graduates at the moment and consider lack of maths to be the main problem with candidates.

Where do I start?

You need to learn a programming language. There are many possible languages but to do this properly you should learn C++ as nowadays it is the most common language that games are written in. There are still games being written solely in C and a smattering of assembler is used but the trend is very much to C++. This is mainly because games have got bigger and more complex. With C++ you can more easily manage and maintain huge amounts of code than with C.

Other languages like C# (C sharp), Java, Flash etc. have their place.. Games written in these languages run slower than C++ games but the advantage (in theory) is rapid development. A drop in speed may be worth it if you get your game out in quarter the time! The problem with C# is that only the Xbox community games area supports C#. Java and Flash can be used for online games. All major game consoles use C++ only.

Other devices like phones are becoming gaming platforms. For the iPhone development is done using Objective C and for Android phones it is Android.

Microsoft have released XNA which is a set of tools that allow you to quickly program games for Windows and the Xbox 360 console. Programming is done in C#. This may be an ideal place to start learning games programming although if you want a career in games you will still need to learn C++.

OK so I learned a language, what is next?

The next step is to learn to use a graphics API. An API is a way of communicating with hardware and is often provided free. The two main graphic APIs for PC games programming are OpenGL and Direct3D. They are both very powerful and have pros and cons (often the subject of heated debates). Most commercial PC games are written using Direct3D.

Direct3D is an API that is part of the DirectX SDK that is freely available from Microsoft (see DirectX Q&A). The SDK contains other APIs for input, sound, music and video.

So is that all there is to writing games?

Not by a long way. There are a lot of skills and knowledge you need to obtain - however it is great fun just learning. I have used this site to hopefully pass on many of these skills. There are also many other sites on the Internet that can help you and nowadays there are also a lot of books available.

One of the big issues I observe with new games programmers is when they have learned to do the graphics but then come to putting it all together. This is really a software engineering task and again I try, on this site, to pass on some of my knowledge in this area. I hope to add more on this in the future especially as I am planning on carrying out more formal research on games software design.

Now I want a job!

Getting a job in the games industry is the dream of many people. When I worked in the industry I occasionally interviewed potential candidates and since then I have spoken to a lot of students on their interview experiences so I have passed on some of this knowledge in the Industry area.

Learning

We all learn differently. Some of us learn best by reading books, others learn best by example. Find out how you learn and use this knowledge in your choice of learning materials. Don't give up! There will be points where you will be ready to give up. You are bombarded with so much new information that it can seem too much. However stick at it, break problems down into smaller steps, and one day your name could be on the next big release - good luck!

How can this site help me?

The pages on this site originated from my teaching of games programming at Teesside University. They can take you from a little C++ knowledge, to setting up a DirectX application, through to 3D graphics, techniques like collision detection and into other areas like music and video play back (a full index can be found here: Games Index) I do not teach C++ but there are many good sites and books that can help you there.

Update: I have just started adding notes on using XNA and C#  to write games for the PC and Xbox 360.

Once you know some C++ this site can get you up and running with the DirectX API and on to writing games. Probably the best way through these notes for the beginner is:

  1. Learn enough of the Windows API to act as a base for DirectX
  2. Learn how to set up the Direct3D API
  3. Draw some sprites and learn about textures
  4. You are now ready to program 2D games, visit the 2D Games page for useful techniques.
  5. If you are looking to create 3D games then visit the 3D rendering section where you will learn about rendering triangles, using the z buffer and the Direct3D matrices.
  6. Look at some of the more advanced graphic techniques like animated 3D models, lighting, skybox, camera, terrain, picking and collisions.

You can search this site using the search box that can be found at the bottom of each page.

Once you have worked through the above you are well on your way to being able to create games. After creating the graphics you may wish to add music and sound effects and handle input. There are also pages describing general game programming techniques and specific graphics techniques.

Further Reading

  • See the resources page for some books about learning a language and useful links.
  • See the XNA and C# pages
  • Blitz Academy - Created by Blitz Games this is a useful site full of advise on how to get into games development.



© 2004-2014 Keith Ditchburn