Most of what you need is already provided via the download of the TGEA Alpha kit. You will need to install the DirectX SDK and make some changes in the project to get it working. Anyway, this will tutorial will assume you know nothing and will walk you through selecting the project and building the file. You should be familiar with running the kit already since this is just building a new Torque DLL that is already provided with the download. You will only need to recompile if you wish to make changes or debug.
Getting Visual Studio 2008
Luckily Microsoft provides a free version that should do everything we need. You can find it here.
http://www.microsoft.com/Express/Download/
I am personally using the not so free version, so hopefully this all should be correct. You will want to download Visual C++ or the full version as an ISO. Once that is done install it and make sure Visual C++ is installed since it will need to be used to compile the project.
Getting the DirectX SDK
You will need the library/include files included in the SDK. I am using the March 2008 release, but you can do a serch for DirectX SDK and get the latest release if you wish. The March 2008 release is available here.
Install it using the defaults since this tutorial will reference those locations shortly.
Get AFX 1.1.2 for TGEA 1.7.1
Download AFX 1.1.2 from the garagegames website.
Install the patches
Follow the instruction specified by the patch. It will make modifications to the project allowing you to compile in the changes needed for the kit.
Opening the Project
After applying the patch you should now have a vc9 folder in the TGEA folder. Open the folder and double click on TGEA SDK.sln. This will open all the projects for the SDK along with the TGEA build itself.
Adding the DirectX SDK files to the project
Once the project is open go to Tools Menu and click on Options. Click on the Projects and Solutions dropdown and click on VC++ Directories. Once this is selected click on the dropdown for Show directories for and choose Include Files. You will need to add the location for the DirectX SDK here. It should be located by default using the March 2008 download (note it is Program Files (x86) if you are using 64 bit Windows).
C:\Program Files\Microsoft DirectX SDK (March 2008)\Include
Once this is done go to the Library files and do the same thing but with this new location.
C:\Program Files\Microsoft DirectX SDK (March 2008)\Lib\x86
Once this is done you should be set to compile for the first time.
Compiling
By default it is going to compile TGEA into a file called pygtea.pyd and place it into ../examples/pytgea.pyd. This location is in reference to the vc9 folder so it at the same level of the vc9 folder (the examples folder). The primary options when compiling are going to be a release or debug build. In the tool bar in Visual Studio you should see what looks like a green run button and next to it a drop down with options. Release is an optimal compiled file with no debugging information. There is also Debug that can be used to debug issues with TGEA. A debug compiled file is roughly twice the size and will greatly drop the framerate of the game so you should only use it to debug issues. Once you choose which one you want to compile go to the Build menu and choose Build Solution (F7). It could take 5-30 minutes depending on the speed of your computer. Once done you should have 0 errors and perhaps a bunch of warnings. If you are getting errors make sure you correctly added the DirectX SDK as mentioned above. One compiled a new pytgea.pyd will be compiled.
Changing the pytgea.pyd location
After awhile moving the file gets a little old so we want to dump it to the proper location. Please note the game cannot be running when you compile since the file cannot be overwritten. In order to change the location follow these steps.
1. In the Solution Explorer right click on Torque Game Engined Advanced and choose Properties.
2. In the Configuration Dropdown choose either Release or Debug (make sure to repeat these steps for the one you do not choose).
3. Click on Configuration Properties->Linker->General. Change the Output File to the location of your MMOKIT. Make sure to include pytgea.pyd as part of the file since it needs the path and the filename.

