sddocs.gif (5506 bytes)

So You want to be a Games Programmer!

This article is a collection of advice for new games programmers. Much of the advice is non-technical in nature and can be applied to any game, platform & language.

Can you already program ?

If you can already program but have never tried your hand at games you only need to concentrate on learning the theory of game design and those elements of programming which are specific to games ( eg: performance, graphics & sound ) if not you need to learn you how to program as you go along and the type of game you design will need to be fairly simple to fit in with your skills level.

Assess your graphics capability

All games use graphics. Very simple games ( eg: Tetris & it's many clones ) only need a very basic drawing skill level. Once you want to animate highly detailed animations you need to be a computer artist or have the services of a good computer artist. If you decide to team up with a graphics artist you should be able to find a partner through one of the many internet graphics sites. If you intend to draw your own graphics you will need a high quality graphics package with a good feature set. You can't do really flash graphics with 'windows paint'.

Ensure you have enough spare time

To write a game requires lots and lots of time. No!, even more than that, whatever you think, double it a couple of times. A small game might take a few weeks to develop. A major title could take a year or more. You need to pick a project which you can actually manage both in skill terms and in time.

Planning Saves Time

If you work out the fine detail of your game in advance you will save lots of time later. It may seem to take longer when you spend days or weeks writing, sketching or whatever but if you plan the whole project as much as possible you will save yourself many re-writes to add in features or functionality you didn't think about at the start when you just begin coding with a rough idea. Think through all the basic processes needed to achieve the game's object. This will help you to break the game into manageable pieces. If you like to sketch do a story board with your opening titles, games settings, help screens, user interface, game levels, end game and other elements laid out visually.

Get a Note Book (the paper kind)

You can't design a game without a notebook to record your ideas, to sketch rough graphics & to make action lists. Computers can be used as well but there is no substitute for a decent notebook. Buy a nice one with a really smart cover. It will make a really neat souvenir for you in later years when you come across it gathering dust somewhere. During game development remember to re-read all your early notes. You will find that some kind person ( yourself ) has written down ideas for use in the game & then forgotten them. It's like getting ideas sent to you from the past to the future. You'll know what I mean when it happens to you.

Know your hardware and software

Once you decide on the hardware platform you will use learn all you can about it. This does not need to cost much in financial terms as you can get masses of info from the Web. One major issue regarding Windows CE is the different processor hardware in use. The SH3, SH4 MIPS & ARM based machines all have different internal machine code instructions. This means that dependant on the development tools you choose you may have to create different compiled programs for different hardware. Another major issue is the differences in screen sizes, color resolutions and presence or absence of keyboards.If you use PocketC the runtime module takes care of the processor types for you.

Once you have examined the various software development systems for the hardware you intend to develop for you need to choose a development system which provides the capabilities you require and which you can afford. If you already have programming skills in C, C++ or Visual Basic this may lead you to choose a particular tool which utilises your existing knowledge. If you want to program directly on a Pocket PC machine you will find that you are restricted to only a few development systems including PocketC and NS Basic. Both make heavy use of functions built-in to the CE operating system and both also use a runtime system as does Waba, the Java-like development language.

NS Basic. Ability to edit & compile on the CE machine. Similar commands to Visual Basic.

Your compiled programs require a runtime installed on the CE machine to work.

It has a good support & an active web-board. Costs US $ 99.95.

PocketC. Ability to edit & compile on CE & Palm machines. Similar structure to C. Your compiled programs require a runtime installed on the Palm/CE machine to work. Has good support, a very active Web board and a Palm version is also available. Note that PocketC is Shareware. Cost is US $29.99 Note: A PC desktop version of PocketC for CE is in the pipeline allowing CE apps to be developed on your big PC.

Waba Waba is a sub-set of Java and programs can be run on CE, Palm & regular desktop PCs.

Your compiled programs require a virtual machine ( eg: runtime ) installed on the CE machine to work.

Currently free as it is still in Beta ( ie: a working product is available for testing & for use but the system is not yet complete enough to be sold.

Development happens on a regular PC.

Read all the advice you can get about games development

There are lots of good web articles and books about game development. Web sites exist to help independent developers and there are many resources on the web to kick start your programming efforts. Look at what other developers are doing on their web sites.

Play Computer Games

Some people suggest that it's a bad idea to look at other people's work as it can influence you into copying their approach instead of being original. My view is that you can learn so much from other games and have fun as well so no harm's done. If you don't look at other games you will probably not push yourself to improve because you don't know what the competition can do.

Get a good Idea

The game you choose to write may be a completely new concept or a conversion of an existing format. Whatever you choose to do it has to end up being entertaining to as wide an audience as possible.

Don't infringe Anyone's Copyright

Believe it or not you can't just choose your favourite TV series and write a game about it. There's a special legal department sitting in a big building just waiting for you to try it. You won't get far. Be entirely original and even if you are producing an obvious copy of an existing game change all names to protect the innocent (that's you) and don't copy anyone else's graphics either.

Make sure it will work on the Hardware

You can't write a fast moving 3D shoot-em-up which compares to big PC games. Palm/Pocket PC machines are slower and the development systems do not have the enormous wealth of tools available for big PCs. Palm/Pocket PC machines also have very small memories in which to hold all their files and to run programs so you can't design a game with megabytes of graphics because many people won't have enough room on their Palm's & Pocket PCs. In a year or two the hardware will catch up, direct x will be available & really fast games will be possible.

Backup your work

Do you want to know a guaranteed way to lose all your hard work? Don't back it up. This inevitably leads to a hardware failure and loss of hours, days or weeks of work. ( I was that man ). If your program lives in volatile memory in you little Palm or CE machine copy frequently to a flash card if you have one & to your big PC or Mac at regular intervals. I go one further & back the PC up to a zip disk as well. You can get free off-site backup by uploading a zipped copy of your source code & graphics to your web site provider. Your 20Mb web space will never be used up by your actual html pages so you may as well use it for backup.

Write Test Programs

Once you have a good idea and while you are still designing the game write little pieces of code so that you know that you ideas work & run suitably fast. There's no point designing a game with a scrolling background only to discover you cannot scroll the screen. Don't try to write the game in these tests, they are just to prove that you can do what you need to do. This is also a good way to get to know your development system.

Obtain or create utility programs

Your game may need support programs or utilities which you either write yourself or obtain via the web. These utilities will be used to create the data files required by your game. Consider a game with various levels. Each level has to be designed whether it's a simple maze or a complex set of worlds. many PC based game utilities can be found on the web. The files output by you utilities become the input for your game. If you create the utilities with your audience in mind they can become a user tool ( Think of all the Doom editors out there ).

If you are new to programming writing your utilities will help you learn to program. As with the main game work out your designs in advance.

You will need a graphics package ( something like Adobe Photoshop or Paintshop Pro ) and a program to create and edit .wav sound files. Most sound cards come with wav editing software. If you don't have anything look at shareware.com & other download sites.

Design with the platform in mind

Make sure that you design screens which will work on all your target platforms. With screens ranging from 160 x 160 on the Palm to 800 x 600 on some CE Pro machines you have a lot to consider and some compromises to make. The color resolution of the varying formats is also an area requiring thought. You may require completely different graphics on a Palm with 4 grey shades to a 65,000 color PPC machine.

Ask for help when you need it

You can get lots of help from other programmers. Don't be shy but do your own research first. No-one likes being constantly bothered by people who don't read the readily available material first. It's amazing just how helpful people can be so just ask. Due to the fact your plea for help may be read by another programmer who does not speak English as his/her first language keep to plain English. When you come to look for Beta testers you will already have people out there who know what you are up to & who will want to see the results of your efforts.

Comment your work

Game development takes time and can be frustrating. Bugs can be hard to find and the more comments you have the better. You won't remember why you did something 2 days later so comments are the only way you have of understanding your own code. I comment almost every line. Remember that comments don't increase the size of the final compiled program so there is no down-side to including them. In C you can put in big comments using /* lots of comments */ so you can write as much as needed to understand what's going on.

Indenting your code is a form of comment. It helps you trace your way through the program. eg: all lines within a while or if statement should be tabbed in >

while(game_not_over){ // main game loop
        if( shots != 0 ){ //check if out of ammo
                 fire_gun(); //shoot again
        } // end if shots
} // end while game not over

Test your program well

Once you have something resembling a game organise Beta testing. You will find many people on the web interested in testing your game & giving you their views. This testing helps you to find bugs, refine your ideas & also brings useful suggestions which you might never have thought of. I recommend a controlled test program where you know who is trying out the game.

Take advice from your testers but remember it's your game. If re-design decisions are needed after early testing listen but make your own mind up.

Publicise Yourself & Your Work

One problem many people suffer from is humility. You have to kick the habit ( or should that be Hobbit ). You have to publicise yourself. Contribute articles, enter competitions, put your name on everything. eg: Instead of 'Mind Gnawing Zombie's' make it 'Carl Connor's Mind Gnawing Zombie's' ( if your name's not Carl you need to change that bit ).

Legal Stuff

As & when you write a game good enough to publish you will start to see contracts. I know it's really hard when some nice man if offering you money for your game but be careful. One of the biggest selling games of recent times was virtually given away by the author & only the embarrassment of the games publishers caused them to relent & give the boy some real money. The main thing to avoid is signing away all rights to your work for all time.



This article is the work of Ian Ferguson and is copyright SundialSoft 2000.
No part of this work may be reproduced in any other form without prior consent from the author.