Alex Russell's Dos Game Programming in C for Beginners
A Tutorial
Introduction . Chapter 1 . Chapter 2 . Chapter 2.1 . Chapter 3 . Chapter 4 . Chapter 5 . Chapter 6
Return to GameSmith home page .
Alex Russell's Game Programming Tutorial using DX
The above course uses a DX wrapper and MS VC++ to teach the basic of game programing.
Click here download the complete course (200 KB)
Introduction
The course will be done in C using dos 16bit real mode. The video mode is 0x13 (320x200,
256 colours). This has been chosen for simplicity, and availability.
A Note on Compilers
All of the sample code is 16bit dos code. It will not compile if your compiler is
making a windows CONSOLE program. A win32 console program looks like a dos program, but
is a win32 application that cannot use the interrupts, or access video memory as required.
MS VC++ V1.52 is the last version of VC to support creating dos programs. Please check your
compiler's documentation to make sure it supports a 16bit real mode dos exe. DJGPP, a popular free
32bit compliler will not work with this code. Borland gives away Turbo C V2.0 at their web site
and will work fine with all the C samples.
Prerequisites:
Required:
Optional
Why DOS?
Outline
Chapter 1
Chapter 2
Chapter 2.1
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Introduction . Chapter 1 . Chapter 2 . Chapter 2.1 . Chapter 3 . Chapter 4 . Chapter 5 . Chapter 6
Copyright 1998 (c), Alex Russell, All rights reserved Last Updated Aug 2002
There are a number of tutorials available for the intermediate game programmer, but there
are very few good tutorials for beginners who have never drawn a pixel on the screen. A
quick search on the net reveals hundreds of sites devoted to 3D, polygons, texture-
mapping and other advance topics, but the beginner has no where to get started. This
tutorial is for C programmers who want to get an introduction to game programming.
If you do not have these prerequisites you will find yourself consulting your c manuals quite
a bit. I highly recommend that you have at least mastered the basics of c syntax.
Here is a link to Yahoo's c/c++ page, including tutorials,
and this is a good page for C Beginners too.
c, including: pointers, structures, functions, basic data structures (e.g. linked list,
stack), and file i/o
ASM: x86 - there is a little bit of ASM code used to access hardware.
DOS is dead, but it is a great environment for learning the underlying principals of game
programming. All the main principals that are used for any platform can be learned in an
easy to use, and popular operating system.