Game Mechanics Kit 1.2.11 on Torque 3D 1.1 (not patched), installation and guide
by Denis Olshanskiy · in Game Mechanics Kit · 04/06/2012 (5:42 am) · 1 replies
After three/four days of fighting with instructions which comes with Game Mechanics Kit and reading a bunch of material on the forum, I was able to set it up properly and want to share the knowledge with other guys who does not have much experience in VC++ programming and tricks which are needed to make project compiled.
Before I start to share, I would like to ask the developers (if they read my thread) to update the instructions and try to make it for average people :) not for cool programmers, and if you find that my version is good then you are welcome to use it.
The instructions below are for fresh installation of Torque and Your project.
I tried it in Visual C++ 2010 Express. Will try it later on VC++ 2008 Express
PREPARATION
I. What will you need to start with Game Mechanics Kit installation?
=====================================================================
1. Torque 3D Pro engine installed. I use 1.1 version.
2. Visual C++ 2010 Express installed and configured like it is written in Torque 3D official documentation.
See the link: http://www.garagegames.com/products/torque-3d/documentation
3. GMK package. You can buy it and download from garagegames.com/store
++++++++++++++++++++++++++++++++
I used game_mechanics_kit_1_2_11
++++++++++++++++++++++++++++++++
4. Freshly created Full Torque 3D project. See Torque documentation to learn how to do it if you do not know how.
======================================================================
GMK SETUP
II. GMK installation to your project
====================================
The easiest part.
1. Open the folder where you unpacked the game mechanics kit(e.g.:GMK).
2. Enter to GMKT3D directory(folder) and find /game/ directory; Copy it.
3. Enter to the directory where Torque 3D is installed and then to My ProjectsYour_project_name
4. Overwrite Your_project_namegame with pasting the game directory from GMKT3D
====================================
III. ENABLING PHYSICS (Bullet) in GMK and compiling your solution
1. Go to unpacked game mechanics kit GMKT3DbuildFilesVisualStudio 2010projects and copy file
<b>libbullet.vcxproj</b> to <i>where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010projects</i>
-------------------------------------------------------------------------------------------------------
2. Open your project in VC++ 2010 Express:
a. Double click on Your_project_name.sln file in where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010
b. Wait while VC++ will finish parsing all the files.
Now you have your project opened in VC++ in front of you.
-------------------------------------------------------------------------------------------------------
3. Add libbullet.vcxproj to your solution:
a.At the left (usually) you will see solution explorer, which contains projects.
On the top of the list(tree) you will see <i>Solution 'Your_project_name'(18 projects)</i>
Right click on it and choose <i> Add -> Existing Project </i> and find libbullet.vcxproj in where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010projects, and press Open.
This will add libbullet.vcxproj to your solution.
---------------------------------------------------------------------------------------------------------
4. Now in the solution explorer find <i>Your_project_name DLL</i> project, right click on it and choose
Project Dependencies. A window will appear, check-in the libbullet in it and press ok.
Now we showed the dependency from libbullet project.
----------------------------------------------------------------------------------------------------------
5. Adding libbullet to Your_project_name DLL Common properties:
a.Right click on Your_project_name DLL and choose Properties (in the end of the menu).
b.In the opened window in the tree list on the left choose Common Properties->Framework and References.
In the right press Add new reference button and in the list which will appear choose libbullet and press OK.
----------------------------------------------------------------------------------------------------------
6. Providing path for include files for <i>Your_project_name DLL</i> project.
a.Right click on the project and choose Properties.
b. In the opened window in the tree list on the left choose C/C++ -> General and on the right you will see the property fields. Add to Additional Include Directories: ../../../../../Engine/lib/bullet/src;
On the top left corner of the window you will see Configuration field, you should add the path to Additional Include Directories for Debug and Release configurations.
----------------------------------------------------------------------------------------------------------
7. Now we come to the point where we have to update Torque(where your torque is installed)/Engine directory with files from GMK package.
a. Go to your unpacked GMK package /GMK/T3D/ and copy Engine directory.
b. Go to Where_your_torque_is_installed/ and paste it there, it will overwrite and add some files in/to Engine directory.
----------------------------------------------------------------------------------------------------------
8. Now go back to VC++ with your project still opened :) (hope you did not closed it)
We will work now only with <i>Your_project_name DLL </i> project.
So now in the solution explorer do the following:
a.Your_project_name DLL -> Source Files -> Engine->T3D->physics
b. Right click on physics -> Add -> New filter and call it bullet
c. Right click on bullet -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/physics/bullet
----------------------------------------------------------------------------------------------------------
9. Let us add files from GMK physics pack kit to <i>Your_project_name DLL </i> project.
a. Your_project_name DLL -> Source Files -> Engine->T3D
b. Right click on T3D -> Add -> New filter and call it logickingMechanics
c. Right click on logickingMechanics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics directory
d. Right click on logickingMechanics -> Add -> New filter call it physics
e. Right click on physics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics/physics directory
f. Right click on physics -> Add -> New filter call it bullet
g. Right click on physics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics/physics/bullet directory
So in the end you will receive the same directory structure like in T3D.
----------------------------------------------------------------------------------------------------------
10. Find in the solution explorer Your_project_name DLL -> Source Files -> Engine->T3D->logickingMechanics/physics/physics.h file and double click it.
It will open and there you should uncomment line #define PHYSICS_BULLET (just remove // which are in front of the line). Save the file.
----------------------------------------------------------------------------------------------------------
11. Now you can try to compile the solution (F7).
Should compile without any problems.
To turn on the physics in the game you should modify script file in
......./My projects/Your_project_name/game/scripts/main.cs Line 84 uncomment physicsInit("Bullet");
So if you will have a chance to test my instruction, please leave your comments about how to improve it.
Before I start to share, I would like to ask the developers (if they read my thread) to update the instructions and try to make it for average people :) not for cool programmers, and if you find that my version is good then you are welcome to use it.
The instructions below are for fresh installation of Torque and Your project.
I tried it in Visual C++ 2010 Express. Will try it later on VC++ 2008 Express
PREPARATION
I. What will you need to start with Game Mechanics Kit installation?
=====================================================================
1. Torque 3D Pro engine installed. I use 1.1 version.
2. Visual C++ 2010 Express installed and configured like it is written in Torque 3D official documentation.
See the link: http://www.garagegames.com/products/torque-3d/documentation
3. GMK package. You can buy it and download from garagegames.com/store
++++++++++++++++++++++++++++++++
I used game_mechanics_kit_1_2_11
++++++++++++++++++++++++++++++++
4. Freshly created Full Torque 3D project. See Torque documentation to learn how to do it if you do not know how.
======================================================================
GMK SETUP
II. GMK installation to your project
====================================
The easiest part.
1. Open the folder where you unpacked the game mechanics kit(e.g.:GMK).
2. Enter to GMKT3D directory(folder) and find /game/ directory; Copy it.
3. Enter to the directory where Torque 3D is installed and then to My ProjectsYour_project_name
4. Overwrite Your_project_namegame with pasting the game directory from GMKT3D
====================================
III. ENABLING PHYSICS (Bullet) in GMK and compiling your solution
1. Go to unpacked game mechanics kit GMKT3DbuildFilesVisualStudio 2010projects and copy file
<b>libbullet.vcxproj</b> to <i>where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010projects</i>
-------------------------------------------------------------------------------------------------------
2. Open your project in VC++ 2010 Express:
a. Double click on Your_project_name.sln file in where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010
b. Wait while VC++ will finish parsing all the files.
Now you have your project opened in VC++ in front of you.
-------------------------------------------------------------------------------------------------------
3. Add libbullet.vcxproj to your solution:
a.At the left (usually) you will see solution explorer, which contains projects.
On the top of the list(tree) you will see <i>Solution 'Your_project_name'(18 projects)</i>
Right click on it and choose <i> Add -> Existing Project </i> and find libbullet.vcxproj in where_Torque_3D_installedMy ProjectsYour_project_namebuildFilesVisualStudio 2010projects, and press Open.
This will add libbullet.vcxproj to your solution.
---------------------------------------------------------------------------------------------------------
4. Now in the solution explorer find <i>Your_project_name DLL</i> project, right click on it and choose
Project Dependencies. A window will appear, check-in the libbullet in it and press ok.
Now we showed the dependency from libbullet project.
----------------------------------------------------------------------------------------------------------
5. Adding libbullet to Your_project_name DLL Common properties:
a.Right click on Your_project_name DLL and choose Properties (in the end of the menu).
b.In the opened window in the tree list on the left choose Common Properties->Framework and References.
In the right press Add new reference button and in the list which will appear choose libbullet and press OK.
----------------------------------------------------------------------------------------------------------
6. Providing path for include files for <i>Your_project_name DLL</i> project.
a.Right click on the project and choose Properties.
b. In the opened window in the tree list on the left choose C/C++ -> General and on the right you will see the property fields. Add to Additional Include Directories: ../../../../../Engine/lib/bullet/src;
On the top left corner of the window you will see Configuration field, you should add the path to Additional Include Directories for Debug and Release configurations.
----------------------------------------------------------------------------------------------------------
7. Now we come to the point where we have to update Torque(where your torque is installed)/Engine directory with files from GMK package.
a. Go to your unpacked GMK package /GMK/T3D/ and copy Engine directory.
b. Go to Where_your_torque_is_installed/ and paste it there, it will overwrite and add some files in/to Engine directory.
----------------------------------------------------------------------------------------------------------
8. Now go back to VC++ with your project still opened :) (hope you did not closed it)
We will work now only with <i>Your_project_name DLL </i> project.
So now in the solution explorer do the following:
a.Your_project_name DLL -> Source Files -> Engine->T3D->physics
b. Right click on physics -> Add -> New filter and call it bullet
c. Right click on bullet -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/physics/bullet
----------------------------------------------------------------------------------------------------------
9. Let us add files from GMK physics pack kit to <i>Your_project_name DLL </i> project.
a. Your_project_name DLL -> Source Files -> Engine->T3D
b. Right click on T3D -> Add -> New filter and call it logickingMechanics
c. Right click on logickingMechanics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics directory
d. Right click on logickingMechanics -> Add -> New filter call it physics
e. Right click on physics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics/physics directory
f. Right click on physics -> Add -> New filter call it bullet
g. Right click on physics -> Add -> Existing item and add all files from Where_your_ torque_is_installed/Engine/source/T3D/logickingMechanics/physics/bullet directory
So in the end you will receive the same directory structure like in T3D.
----------------------------------------------------------------------------------------------------------
10. Find in the solution explorer Your_project_name DLL -> Source Files -> Engine->T3D->logickingMechanics/physics/physics.h file and double click it.
It will open and there you should uncomment line #define PHYSICS_BULLET (just remove // which are in front of the line). Save the file.
----------------------------------------------------------------------------------------------------------
11. Now you can try to compile the solution (F7).
Should compile without any problems.
To turn on the physics in the game you should modify script file in
......./My projects/Your_project_name/game/scripts/main.cs Line 84 uncomment physicsInit("Bullet");
So if you will have a chance to test my instruction, please leave your comments about how to improve it.
Ahsan Muzaheed
Default Studio Name
i do not have gmk.
but someone have it.
and he was in trouble with some parts of it.
so i helped him.but that was with Game Mechanics Kit 1.2.12.
in that version do not have to do all of these works.
just copy and paste was enough.
the only problem is it's developer's computer's directory structure.
he has used 64 bit os.
so if u go in your step 6 and look into
C/C++ -> General->Additional Include Directories:
then u will see phsyx's wrong dirctory address.it has to be changed depending on where your physx installed.in 32 bit os there is nothing called Program Files(X86).
that is the only problem i have found with 1.2.12.
solution:
best and easy way is cheating with visual studio.
in c drive create a folder named Program Files (x86).and install physx there and make sure folder structure is something like this:
C:Program Files (x86)NVIDIA CorporationNVIDIA PhysX SDK
may be things is different for 1.2.11.
in that case your this thread will be helpful for gmk users.
also i was using vs2010 professional.
may be in express edition this all has to do manually.
although your this thread has helped me to understand some parts of visual studion.
thanks