Tricks of the Windows Game Programming Gurus:Journey into the Abbys

All ITKnowledge Source Code Search Tips Advanced Search |

| Tricks of the Windows Game Programming Gurus by Andre LaMothe Sams, Macmillan Computer Publishing ISBN: 0672313618 Pub Date: 09/27/99

Search this book:

Previous | Table of Contents | Next

## Part I
Windows Programming Foundations

Chapter 1
  Journey into the Abyss
Chapter 2
  The Windows Programming Model
Chapter 3
  Advanced Windows Programming
Chapter 4
  Windows GDI, Controls, and Last-Minute Gift Ideas

## Chapter 1
Journey into the Abyss

> “Oh, you want some too?!?”

> —Hudson, Aliens

Windows programming has been an ongoing war with a long history. Game programmers have resisted the Windows platform since the beginning of time, but like the Borg say, “Resistance is futile…” I tend to agree. In this chapter you’re going to take a whirlwind tour of Windows:

  • History of games
  • Types of games
  • The elements of game programming
  • Using tools
  • An example game: FreakOut

### A Little History

It all began sometime in the ’60s, when the first mainframe computers came to be. Now, don’t quote me on this, but one of the first computer games ever played was Core Wars on Unix machines. When the ’70s rolled around, there were quite a number of text-based and crude graphic adventures running on mainframe computers and minicomputers all around the world.

The funny thing is, back then most games were networked! I mean, 90 percent of the game programs were MUDs (Multi-User Dungeons) or similar simulations, like Star Trek and war simulations. However, the masses never got a taste of computer games until the quintessential Pong came out. Designed by Nolan Busnell, this single game really started the whole video game arcade business overnight, and Atari was born.

Then, around 1976–1978, the TRS-80, Apple, and Atari 800 all hit the market. These were the first computers that a consumer could buy. Of course, before then you could buy kits like the Altair 8000, but who wanted to put them together? In any case, these computers all had their pros and cons. The Atari 800 was by far the most powerful (I’m convinced I could write a version of Wolfenstein that would work on it), the TRS-80 was the most businesslike, and the Apple had the best marketing.

Slowly, games started to hit the market for these systems, and many teenage millionaires were made overnight. A good lunar lander or Pong-type game was all you needed to strike it rich! In those days, computer games looked like computer games, and only a handful of people knew how to make them. There were absolutely no books on the topic. Every now and then someone would publish a 50–100-page, semi-underground booklet that had some pieces of the puzzle, and maybe there’d be a magazine article in Byte, but for the most part you were on your own.

The ’80s are when things started to heat up. The first 16-bit computers were available, like the IBM PC (and compatibles), Mac, Atari ST, AMIGA 500, and so on. This was the time when games started to look good. There were even some 3D games on the market such as Wing Commander and Flight Simulator, but the PC was definitely at the back of the line of game machines. By 1985, the Amiga 500 and Atari ST reigned supreme as the ultimate game-playing computers. However, the PC slowly gained popularity due to its low price and usefulness in the business sector. And the bottom line is that the computer with the largest market base, regardless of its technology or quality, will rule the world in the end.

By the early 1990s, the IBM PC-compatible was the leader. With the release of Microsoft Windows 3.0, it was all over for the Apple Macintosh. The PC was the “working person’s computer.” You could actually play with it, write programs for it, and open it up and connect stuff to it. I think that those are the reasons why so many hobbyists stuck to PCs rather than the sexier Mac stuff. Bottom line—you couldn’t have fun with Macs!

But the PC was still lagging behind in the graphics and audio department. The PC seemed like it just didn’t have enough horsepower to make a game that looked as good as something on an Amiga or a game console.

And then there was light…

In late 1993, Id Software released DOOM as a follow up to Wolfenstein 3D (one of the first shareware 3D games, also by Id). The PC became the game-playing and programming platform of choice for the home computer market, and it has remained that way ever since. DOOM proved that if you’re clever enough, you can make a PC do anything. This is a very important point. Remember it. There is no substitute for imagination and determination. If you believe it’s possible—it is!

After the DOOM craze hit, Microsoft really started to reevaluate its position on gaming and game programming. It realized that the entertainment industry is huge and only getting bigger. It also realized that it wanted to be part of that industry, so big plans were drawn up to get Microsoft into the game.

The problem was that even Windows 95 had terrible real-time video and audio capabilities. So Microsoft created a piece of software called Win-G to address the video aspect of the problem. Win-G was heralded as the ultimate game programming and graphics subsystem. It turned out to be nothing more than a couple of graphics calls to draw bitmaps, and Microsoft literally denied its existence after about a year—no joke!

However, work had already begun on a new set of graphics, sound, input, networking, and 3D systems (a la the Rendermorphics acquisition). And DirectX was born. As usual, the marketing people at Microsoft got carried away, claiming that DirectX would solve all the world’s game programming problems on the PC platform and Windows games would be as fast as or faster than DOS32 games. That didn’t quite happen.

The first couple of iterations of DirectX were horrible failures as actual products, but not in technological terms. Microsoft simply underestimated the complexity of video game programming. (And of video game programmers!) But by DirectX 3.0, DirectX worked better than DOS! However, most game companies at this time (1996–1997) still were working with DOS32, and they didn’t make the transition to DirectX for actual product releases until version 5.0.

Previous | Table of Contents | Next

Copyright © Macmillan Computer Publishing, Inc.

Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.