ARTICLE ARCHIVE
Make your own game

Ever thought you'd like to write your own computer game? Angus Kidman shows you how in this new tutorial series.

Published in PC User,
January 2003w

Computer games have moved on a long way from their origins as basic text applications running on large mainframe systems sometime in the 1960s. These days, the computer game industry is as large and influential as other arms of the entertainment industry. The emergence of cheap, high-powered consoles means that people don't even need to have a computer as such in their house to take advantage of the latest releases.

PC owners retain one big advantage over their console-owning counterparts, however. As well as getting to play the latest releases, they also have the opportunity to actually develop their own games if they wish. Console game development kits generally cost tens of thousands of dollars, but PC games development tools are available free or at minimal cost.

In this new PC User series, we'll examine some of the issues surrounding developing your own games, and introduce you to a number of tools that you can use to learn about games programming. Whether you're keen to pursue a career or simply want to learn more about what makes games tick, learning about games development is a fascinating hobby.

It's all about ideas

Many people are put off the thought of games development because of the high level of technical skill required. It's true that to write a game that compares favourably to the latest console releases will require considerable programming skill, not to mention an in-depth understanding of animation and graphics. However, the most relevant skills in developing games aren't knowing every last command in a given programming language, or being able to create stunning images in Photoshop (although both will help). By far the most important attributes are imagination and persistence.

Working with objects

You can install The Games Factory from this month's cover CD. Once you've installed it, the basic tutorial below will give you some ideas on how to go about developing games with the package.

1. Launch The Games Factory.

2. Close the Storyboard Editor (the window which automatically displays when the program loads).

3. Select New from the file menu to create a new game.

4. You can now select the size of the window in which the game will be played. For the purposes of this demonstration, select any size you like. (Many smaller Windows games are typically placed in a 640 by 480 screen, so that other applications remain visible. Full screen mode is more suited to highly graphical games, a topic we'll return to in coming months.)

4. Select Game setup from the File menu.

5. Enter 'PC User Maze' (or whatever game name you like) and your own name in the Title and Author boxes. Tick the 'Machine-independent speed' option, to make sure your game will run at the same speed on machines with different processors. (This is important) You can leave the options under the Window, Instructions and Players tabs as they are for the moment; most are fairly self-explanatory. Click OK when you're done.

6. In the Storyboard editor, click next to Title and enter 'PC User Maze' (or whatever game name you've chosen). It might be a good idea to save your work to date at this point (select Save from the File menu).

7. We're now going to add one of the pre-defined characters into our game, using the Level editor. Right click on the current level in the Storyboard Editor, and select Edit this level, then Level editor. A new screen will appear.

8. Click on the drop down menu near the top (which lists categories of pre-defined objects) and select Fully animated characters 1. A selection of images will appear at the left-hand side of the screen, showing the available characters.

9. Select the second-to-bottom character, who is called Space Marine 2, and drag him onto the blank workspace.

10. Now we're going to define how the character moves around the screen. Right click the Space Marine, and select Movement, then Set movement.

11. Click on the Eight Directions button in the dialog box that appears.

12. On the movement screen, deselect the Moving at start option.

13. If you want to, click the Try Movement button for a chance to test how your character moves around the screen. Notice that the character is animated for movement left and right, but not for movement up and down. Hit ESC to return to the editor.

14. If you select Run Game from the Run Menu, your game will appear in a separate window, and you'll be able to move your marine around at will. Notice that if you move the character past the edge of the screen, he disappears -- a reaction you probably didn't expect. This underscores the importance of extensive testing in games development.

Although we've only created a single element for our game -- a character moving around the screen -- virtually all development in The Games Factory is carried out using the same basic procedures we've followed above: adding (or designing) a new element, right-clicking it to define its properties, and then running tests to see if all the elements behave as we expect. You can also add additional levels to games (which would be suitable for a game which progresses through multiple screens, Pac-Man style), retaining objects from earlier levels.

Experiment a little and see what changes you can make to how the marine moves around the screen. Don't forget to save your game when you're done!

Computer games have long been divided into a number of distinctive sub-genres -- platform adventures, RPGs, shoot-em-ups, puzzle games and so forth. However, the games that have the greatest impact are often those based on a simple but new idea. Tetris took the gaming world by storm in the late 1980s, even though its graphics were extraordinarily simple, because it was both innovative and easy to grasp. Doom had a similar impact in the world of shoot-em-ups in the early 1990s. If you can come up with a concept that has similar impact, you could make a fortune and also influence the whole direction of future game evolution. Imagination is the key.

Having a good idea is only half the battle, however. You'll also need considerable patience in developing the idea into a full-blown game. By far the most time consuming aspect of creating a game is the initial planning, followed closely by the detailed programming required to turn that vision into reality.

Imagine you're developing a racing game featuring six tracks, for instance. Each track needs to be completely mapped out (in your head or on paper), including shortcuts, ramps, slopes and obstacles, before you can even begin to consider how to model it on your PC.

Once those maps are drawn up, you'll also need to enter all their attributes into your chosen programming system. Many games developers begin the task enthusiastically, but then abandon ship when they realise how much fiddling around with details is required. In this respect, games development is no different to any other area of programming, and indeed is a useful training ground for developing in other areas.

If your ideas are good enough and you develop them to their fullest extent, games development could move from being a hobby to a career. These days, you might not even have to move overseas to pursue that option.

Programming challenges

As we mentioned earlier, developing games for consoles normally requires investment of large sums of money for development kits. Most commercial PC games are created using popular existing programming environments, but these can also set you back a considerable sum, not to mention the time taken to learn the packages themselves.

However, it isn't essential to learn a complete programming language to experiment with games development. In this series, we'll be looking at freeware and shareware tools designed specifically for building your own games. While these may lack the overall flexibility of general-purpose programming tools, they more than compensate for this by making it easy to achieve a single games development task. Individual tools are available for tasks as varied as building text adventure games or 3D scrolling shooters, and we'll examine as many as possible over the coming months.

The choice of development tools is highly personal. You may find one tool particularly appealing, and be appalled by another. However, working with a large number of software packages will give you a broader appreciation of how different tasks can be achieved.

Each month in this series, we'll be looking at a different games development tool. To kick off, we'll be checking out The Games Factory from Clickteam. The key advantage of The Games Factory is that you can develop quite complex games without having to learn any programming or scripting language. The Games Factory achieves this feat by allowing you to define individual objects such as player characters, enemies, weapons, backgrounds, and then define how these interact with each other. The software includes many pre-defined objects to help you develop games rapidly.

Next month, we'll look more closely at one of the challenges faced by all games developers, regardless of their development platform: how to create good-looking graphics. In the meantime, get your imagination working. Start thinking about the kind of game you'd like to create. Do you want to combine two existing genres? Build a replica of a fondly-recalled game from your childhood? Or come up with something entirely new?

BACK TO THE GUSWORLD WRITING PAGE