Game Programming's bible example program.