Using Old Source Code


Hello and welcome to the home and support page for the tutorial series, "Using Old Source Code!"

Last Update 07-20-2020

About
My video tutorial series, "Using Old Source Code", shows you how to set up your IDE to compile and run the code from old programming books. I have looked for this information many times over the years. Nobody else provided it, to my knowledge, so I am. For now this series is focused on Andre LaMothe's, "Tricks of the Windows Game Programming Gurus." I take you step by step through setting everything up CodeBlocks, Visual Studio Express C++ 2008 and Visual Studio Express C++ 2010. In the end we get the first game, Freakout, up and running, with only one change to two source code files, the removal of a .h. Nothing else is needed.

The operating system I am using is Windows XP SP3. The version of DirectX I am using is DirectX 9, the June 2010 release. While these instructions may have some value for Windows Vista - Windows 8 and Visual Studio Express C++ 2012 I can make no guarantees. However there should be no problem following along using Visual Studio Express C++ 2005. Additionally what I teach here should apply to DirectX setup for any other IDE at least in general, although the user should know their compiler well enough to adapt everything as needed.

Later I will probably work on Michael Dawson's, "Beginning 3D Game Programming in C++" and then perhaps Hawkins and Astle's, "OpenGL Game Programming." After that, once my programming and math skills are sufficient, I will turn to Vaughan Young's "Programming a Multiplayer FPS in DirectX" and Greg Snook's, "Real-Time 3D Terrain Engines using C++ and DirectX9." I have all these old programming books, and I intend to get the code running from all of them.

My purpose here is simple. To teach programmers to become intimately familiar with their compilers so they can use any book, no matter how old, and if the code is even remotely usable, figure out how to get it to compile and run. They should also be able to do this on any computer that can run Windows XP as there are no special hardware requirements like Pixel Shader 2.0 for XNA 3.1.

For those who want to learn to program with a focus on games they should, through this ongoing series, find plenty of books they can now use. It is my hope that one of them will take all they have learned and create a comprehensive course in programming with an emphasis on the fun stuff - games. I would like to see the old teaching paradigm for programming fade away like the horrible nightmare it is.

7-20-2020
Apparently there is still interest in this old series as recently as 6 months ago. I am not sure if I can retrace my steps and update everything with DirectX 11. I have a lot of other irons in the fire, as it were, and I have stopped trying to do anything at all with programming.

That said I have found copies of many books covering this topic, and will go and hunt down any source code I can find, placing links to it here. I have downloaded a variety of IDEs and may see if I can get some of the code from these old books to compile and run. A lot has changed from DirectX 9 to DirectX 11, and Windows 7, the OS I am mainly using, is no longer supported.

The videos have been moved to my new channel, BlissTech. I may move any files to their own Google Drive page. For now I will start updating the information shared here, and fixing all the broken links.

Using Old Source Code Playlist

Archive Programs

AllCode
I have updated this again, removing the WindowsSDK files from the main include and lib directories. It just seems to be screwing everything up, so now it is in its own directory and you can add the files you need. I built up everything from DirectX 2005-2014 and OpenGL 1998-2014. I have combined only the 32-bit versions of DirectX and OpenGL into the include and lib directories.

As of right now, if you are using Code::Blocks MinGW version, I advise that you copy the .dll files into CodeBlocks/MinGW/bin. You may also copy the include files into CodeBlocks/MinGW/include, but be sure to move the gl files into CodeBlocks/MinGW/include/GL after doing so. Those files are:

gl.h

GLAux.h

glcorearb.h

glext.h

glu.h

glui.h

glut.h

glxext.h

wglext.h

I have tested this and found it to work for "OpenGL Game Programming" and "Tricks of the Windows Game Programming Gurus." The latest video in the "Using Old Source Code Series", episode 11 as of this writing, covers this. The next step is to get it working with "3D Game Programming with DirectX 9" and "Create A Multiplayer FPS in DirectX."

My whole goal here is to make it so any proper C++ code, no matter how archaic the libraries it used may be, can be compiled and run with little if any alteration. Sure, GLaux.gl is an archaic way of working with textures in OpenGL. Certainly the code that uses this should be updated with a better and more current library.

But if you are just starting out in programming, and trying to work your way through a book, you do not have the experience and knowledge you need to make those alterations. Which can cause a lot of frustration, especially if you paid a good $30-$50 or so for one of these books and just want to work through it. Your focus should be on learning how to program, not fixing archaic code! So that is why AllCode exists.

If anyone out there understands what I am trying to do here and is willing to help in any way, please contact me! All feedback, especially the constructive and helpful kind, is welcome!

AllCode Download

IDEs (Integrated Development Environments):



DirectX SDK

DotNet

Source Code

VC Redist

Visual Studio

Windows 7 SDK

Windows 10 SDK

No comments:

Post a Comment