LESSON #15:
GAME PROGRAMMING

NOTE: most of these lessons are primarily aimed at aspiring game designers, but this one is primarily aimed at aspiring game programmers! Many of the concepts described herein also apply to those who aspire to other types of jobs in the game industry. This lesson is subject to changes and improvements; reader comments are welcome.

Originally written in May, 2002 -- most recent update: February, 2010

Please welcome guest lecturer Marc Vaughan (MarcV2@aol.com), Head of Development at Sports Interactive Ltd. (http://www.sigames.com/), a game development company headquartered in Islington, London. Marc is a frequent contributor to the Game Design BB and has graciously offered his perspective in answer to the frequent request for information from aspiring programmers.

First, Marc discusses the job of being a game programmer (salary, hours, requirements, etc.).

Then he gets into the nuts and bolts of how you can program your own game.

Tom is taking a seat with the rest of the class, and when he speaks up, he does so in red text.


Game Programmer
=======================================
A game programmer is someone who actually implements the game on the computer, turning the ideas and designs into an actual program. Despite often having to work long hours and rarely getting their photographs in games magazines it is a fun job and can be very rewarding.

Being the person who actually implements the features allows you to have a major input on how everything actually works when the design changes from 'theory' to 'implementation'.


Starting Out:
=======================================
You can obtain an entry-level games programmer position if you have either a very good knowledge of the required programming languages (and a portfolio of examples to back this up) or a university level programming qualification.

An entry-level position is normally that of 'Junior Programmer', in this position you will often be implementing other people's designs under the watchful eye of a more experienced software engineer.

It is unlikely that you will remain in a junior position for too long as the games industry is very dynamic and it is possible to rise through the programming ranks very quickly.

For example, here at Sports Interactive, Kevin Turner is now a Senior Programmer a mere 5 years after joining the company.


Salary
=======================================
The position of games programmer is one of the best paid positions within a games company, an entry level programmer can expect to earn between £15-25k/year rising to around £35-65k/year should they eventually obtain a lead programmer position. According to the 2001 and 2002 salary surveys of Game Developer magazine:

Want the latest word on salaries in the games biz? Go to gamecareerguide.com and type "salary survey" in the site's Search box.

(*Note: 'k' = 1,000, and salaries are per year.)
(Note: As of March 2004, the 2003 Salary Survey is now available - go find it.)


Hours
=======================================
In a typical week a programmer can expect to work around 40 hour week (most likely using flexi-time), however in the two month period before the release of the game you can expect to be working much longer hours, up to around 80-100 hours a week.


Office
=======================================
This will vary greatly dependant upon the company, but generally programmers are housed in an open-plan environment in order to facilitate communication between those involved on a project.


Company car
=======================================
Very little chance, there is next to no travel involved in being a games programmer.


Health insurance
=======================================
This depends largely on the size of the company. Those working full-time for one of the larger publishers are far more likely to receive health insurance benefits than those working for smaller companies.


Paid vacation
=======================================
As a result of the long hours worked, companies tend to be very generous in vacation allowance. In England programmers tend to get at an allowance of least 25 days per year, with additional days being made available if products ship on time.


Sick leave
=======================================
Yes of course.


Jury duty
=======================================
Depends on the company


Retirement
=======================================
Again this is largely dependent on the company. A high level of staff turnover deters many games companies from operating a pension scheme. However there are some exceptions, for instance Sports Interactive have a pension scheme, partially because we have a very low staff turnover rate.


Advancement opportunities
=======================================
After starting as a Junior Programmer the most common route is that up to a role leading a team of programmers, thereafter you may eventually branch out into either a more design orientated role or that of a Technical Director. Alternatively once you have enough experience it is possible to go it alone and attempt to start your own company.


Stock plan
=======================================
If the company is a publicly held company, there may be a program for employees to chip in a little from their paychecks and purchase stock in the company. This can give an added incentive to the workers to make the company successful.


Stock options
=======================================
Big publicly held companies may well offer employees stock options (the option to buy company stock in the future at the price at time of hiring). This is a tactic employed to reduce staff turnover levels, supposedly working by breeding loyalty as employees have an added incentive to make the company successful and to stick around for a longer time than would normally be the case.


Bonuses
=======================================
Most game companies will share profits with the employees in "up" years. Each company has a different way of determining bonuses (may be based on longevity, on job title, on level of contribution to successful products, etc.).


Job description
=======================================
Come to work every morning (or wake up in the office). Implement code efficiently and accurately with a minimum of bugs. Communicate effectively with designers/team leaders with regards to progress.



======================================
BECOMING A GAME DEVELOPER
======================================


What tools do I need to program a game?
==========================================
This varies somewhat from game to game depending upon the genre in question, but generally speaking you will require the following items to make a game.

Compiler
A compiler is a program which takes several text files containing 'code' and converts them into an executable program which can be run upon a PC.

Drawing Package
This is simply a paint package within which you can draw buttons, sprites etc. for use in your game.

Text Editor
This is the program that you will use to create the files containing your 'code'. Most professionally produced compilers will come with an IDE (Integrated Development Environment) which contains a text editor, however some free compilers (such as the GNU C one) require you to use a separate editor.

Depending upon the approach you take these may either cost you nothing, or several thousand dollars.

I would recommend that anyone who is simply casually investigating programming for the first time simply download one of the 'older' Borland compilers (should be easy to find through a simple Google search). This will allow you to experience the joys and frustrations of programming without spending any money. Once you are sure that you enjoy the challenge, you can consider upgrading to a newer and more fully featured compiler.

I've listed the most common development tools below and a brief assessment of their advantages and disadvantages:


Program

Advantages

Disadvantages

Visual C++

Commonly used, well supported

Only on PC/Xbox, Not for beginners

Visual Basic

Easy to use

Slow and large executables

Delphi

Easy to use

Slow and large executables

GNU C++

Free, Good x-platform support

Hard to use

Metroworks

Good x-platform support

Support varies platforms



How can I learn to program?
=======================================
There are two common ways to learn programming, one is to go to university/college and take the relevant classes, the other is to purchase some books on the basics of programming and teach yourself.

If you are looking towards games programming as a potential career then I would recommend the university approach. The main reason being that it will help you avoid various common programming pitfalls that you might fall into should you take the self-taught route. Furthermore you will also find it much easier to land a job with a qualification behind you.

If you are thinking of programming a game as a hobby then I'd suggest purchasing a few books on the basics of programming. (See Lesson 8 - and reader suggestions for programming books are more than welcome.)


What language should I program my game in?
=======================================
The most commonly used languages for developing professional are 'C' and 'C++'.
These are fairly advanced languages which beginners can find quite hard to learn initially, simply because they are very low level and don't supply many building blocks to use for making games.

Languages such as Visual Basic and Delphi can give a much friendlier approach to games development for beginning programmers. These are much more visual and it is (relatively) easy for someone to get a basic demo up and working quickly using these.

I would recommend using Visual Basic if you have no prior experience of programming or if you have some programming experience then I would suggest using the language you have the most experience in.

This is important because the most common reason quoted for giving up programming is simply 'I don't seem to be making any progress'.


Starting Out
=======================================
If you're starting out with learning programming and want to dabble without paying out a fortune for software then you can get a fair few compilers and suchlike free online. These vary from open source projects (GNU C++ etc.) to products released by Microsoft (such as Visual C++ Express Edition).

I'd recommend Visual C++ Express if you're hoping to make a career in programming - simply because Visual C++ is one of the most commonly used compilers (both in the games industry and elsewhere). You can find it at:
http://msdn.microsoft.com/vstudio/express/visualc/download/


So now can I write Quake 4?
=======================================
No, I'm afraid not - programming is a very complex business and takes quite a while to master. Initially you'll have to be very patient.

I recommend starting with very simple games such as 'tic tac toe' and 'connect 4', these will teach you the essentials of game development such as designing a User Interface, basic Artificial Intelligence and how to draw to the screen.

Once you're confident at creating a simple game such as these you can start making games that require animation such as a simple platform game or a scrolling "shoot-em-up."

Finally, once you've done that you'll probably be fairly competent with your coding and ready to move into the realms of 3D game development (should that be your aim).

As a final word, never get too cocky and assume that you know everything there is to know about games programming - I've been doing it for around 10 years now and I'm still learning new tricks.


More on this from Tom:

Another thing you can do 'at home' is to start by modding existing games on the PC. When you're ready to tackle something of your own, first you'll need to write a complete design for your game idea (see FAQ 2 and FAQ 13).

I sincerely hope you're planning to get a college degree in Computer Science. If you can get to a game-specific school like those listed in our Game Biz Links page, all well and good -- but a Computer Science degree from any solid institution of learning is fine (if not better - see FAQ 44). And do read this December 2007 article: Schooling Game Programmers: Specialized Degrees vs. Computer Science by Marie Ferrer in GameCareerGuide.

See FAQ 12 for tips on things you can do at home to build your portfolio (the focus there is on game design rather than programming, but it'll give you some ideas to start with). See the Game Biz Links page (nav frame at left) and find forums where you can hang out and talk promects and portfolio-building.

Added 2007: the latest Salary Survey is at http://www.gamecareerguide.com. Also check the IGDA site.

See FAQ 56 for my humble attempt to answer the question, "How Do I Program My Own Video Game?". A number of links that used to be found right here have been moved to FAQ 56. (October, 2005)


The FAQs for the GameDev.net "Business of Game Development" forum, at http://www.gamedev.net/community/forums/showfaq.asp?forum_id=5, are an additional must-read.

See this website's Game Biz Links page to find sites where game jobs are advertised.

Got a question about this lesson? No need to raise your hand -- just click here to go to the bulletin board. You'll get answers! Tom isn't so good with programming questions, but if you ask nicely, Marc will answer you!

Click here to go to the previous lesson.

Click here to go to the next lesson.

Click here to return to the School-A-Rama main page.

© 2002-2010 Tom Sloper and Marc Vaughan. All rights reserved. May not be re-published without written permission of the authors.