Write a DOS Game

Put your old game programming books to good use.

Many of the most fondly remembered games in video game history were DOS games. Scorched Earth, Lemmings, the Ultima series, King’s Quest, The Secret of Monkey Island, Warcraft, and many others have brought countless hours of entertainment to gamers everywhere. But, why should it stop there? With just a compiler, a decent game programming library, and a little ingenuity, you can create your own games to run in DOS alongside the giants of yesteryear.

Enter DJGPP and Allegro

DJGPP (DJ’s GNU Programming Platform) is a free C/C++ development system for MS-DOS. It began in 1989 in response to a comment by Richard Stallman that gcc, the standard UNIX C/C++ compiler, could not be ported to MS-DOS due to the limits of DOS’s 16-bit architecture. DJ Delorie took this statement as a challenge and began working on his port of gcc to MS-DOS. Since then it has become a stable and feature-rich product with a wide array of support programs and code libraries.

Allegro is a game development library developed for DJGPP that has since been ported to multiple operating systems. It wraps routines for handling 2D graphics, sound, input, and networking in a series of simple-to-use functions. Not only does Allegro simplify development by abstracting what would otherwise be complex, hardware-specific code, it also allows easier porting of projects to other operating systems supported by Allegro.

Both DJGPP and Allegro can be found at http://www.delorie.com/djgpp/ ...

Get Retro Gaming Hacks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.