Game Development Community

dev|Pro Game Development Curriculum

Building Torque 1.4 on Visual Studio 2005 Professional and Express Editons

by Ray Gebhardt · 11/26/2005 (5:35 pm) · 63 comments

This resource has be replaced by this TDN article:
tdn.garagegames.com/wiki/Torque/vs2k5
#41
03/12/2006 (2:36 am)
I also get this message:
fatal error LNK1104: cannot open file 'engine_DEBUG.lib'

and cant compile the engine. can someone please help???
#42
03/12/2006 (1:16 pm)
I also had some linker errors with the TorqueDemo project I resovled it by adding:

User32.lib gdi32.lib Advapi32.lib

To that project: Torque Demo-->Properties-->Linker-->Input-->Additional Dependencies

Be sure to do this for both release and debug.
#43
03/14/2006 (12:43 am)
SYNOPSIS:
There has been some confusion on building Torque 1.4 with VS. I am going to try and clarify the subject by compositing all the references which I feel are accurate through research and testing and present them in a functional form.

PROCEDURE:
It is assumed that VS and Torque 1.4 is already installed and configured at this point. This is not considering any additional enhancements to either.
1) Download and install the DirectX SDK from Microsoft. Take note of the install directory.

2) Open VS, Goto Tools->Options. Expand "Projects and Solutions" on the left and click on "VC++ Directories"
Choose "Include files" from the "Show directories for:" drop down in the top right. Add these two entries (click on the folder looking button):
(DX SDK dir)\include
Choose "Library files" from the "Show directories for:" drop down in the top right. Add this entry (click on the folder looking button):
(DX SDK dir)\Lib\x86
Close the Options window.

3) Next, Goto File->Open->File and navigate through the VS installation dir until you reach the "VCProjectDefaults" folder. Inside will be the
#44
03/19/2006 (1:43 am)
Well it's been some time now and there have been no new posts. I suppose the problems have been solved. Cool :)

Please, anyone feel free to copy my previous post to any other location so it may serve as a better resource for future reference.
#45
04/13/2006 (3:47 pm)
@Christopher

Not sure if it matters, but I just re-downloaded the SDK and it has changed. The one I downloaded only has a WIN95 directory rather than a X86. The old SDK I downloaded I remember as having.

There is slight possibility I screwed up:) But the game is compiled and running with no problems.


Other than that, I have used this resource on 2 different and separate installs with no hassle.

(Let me rephrase this as well. Intsall was for Visual Studio Express 2005)
#46
04/18/2006 (9:55 am)
If anyone finds themselves here. TDN Has some really simple instructions.
Its all pretty automatic and it worked for me just now.

Check it out

http://tdn.garagegames.com/wiki/Torque/vs2k5
#47
04/21/2006 (7:39 am)
I'm running through Matt's New Directions (from the link in the last post) for Compiling TGE 1.4 with VS 2005 Express and am running into the below errors. If I can't resolve this, I'll set it up using the Old Directions which has worked for me in the past. Excuse my ignorance, but does anyone know what's going on with these 2 errors? Thanks!

------ Build started: Project: Torque Demo, Configuration: Debug Win32 ------
Performing Custom Build Step
nasm: unable to open input file `c:\Documents and Settings\Jake\My Documents\Torque\SDK\engine\platform\platformCPUInfo.asm'
Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '..\engine\out.VC8.DEBUG\abstractPolyList.sbr': No such file or directory
Build log was saved at "file://c:\Documents and Settings\Jake\My Documents\Torque\SDK\engine\out.VC8.DEBUG\BuildLog.htm"
Torque Demo - 2 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 5 up-to-date, 0 skipped ==========
#48
04/26/2006 (4:49 am)
Does anyone have instructions for Comiling TLK 1.4?

-Surge
#49
05/12/2006 (1:23 am)
I combined the tde help and an old gg forum help to make an easier to follow "clean" install guide for tge 1.4 using the free vs2005 express edition using the new vs2005 upgrade file from gg.
I compiled fine using it.. maybe it will help someone here...

Quote:
Solution: New Game Project with VS2005

You only need to do this if you know (or are pretty sure that you know) that you will be editing the source code included with the Torque SDK to build your game. If you don't think you'll need to do any C++ programming, and are certain you can build it just using the Torque Scripting Language, then you don't need to do all this.

1. Download TorqueGameEngineSDK-1-4.exe from the GarageGames website from Your Account page.

2. Run TorqueGameEngineSDK-1-4.exe and let it install to C:\Torque\SDK

(b) Download and install the VS2005 upgrade and export it into your main directory (/Torque/SDK/)
http://tdn.garagegames.com/wiki/images/e/e8/TGE_VS2005.zip

3. Make sure that .cc and .cp files are registered correctly with VS2005 by right-clicking on the file "C:\Torque\SDK\vc7\VC7 .cc compiling.reg" and selecting "Merge" and then answering "Yes"

4. Come up with name for your game that you can live with for awhile (I'll be using "mygame" for this set of instructions)

5. Create a new folder at the root of your C:\ Drive that will be the name of your project (c:\mygame)

6. Copy all the contents of C:\Torque\SDK to c:\mygame

7. Delete c:\mygame\uninst-tsdk.exe

8. Delete c:\mygame\ReadMe.html

9. Open .\VS2005\Torque SDK.sln in VC++

10. In the solution explorer, right-click on select Project Dependencies (make sure you have "Torque Demo" selected)

11. For each Dependency that is _NOT_ checked, you can (a) delete the project in the solution
for version 1.4, I deleted these projects from the solution:
buildWad
dtsSDK
fonttool
langc
map2dif
map2dif plus
max2dtsExporter
max2dtsExporterPlus
max2mapExporter
maya2dtsExporter
ms2dtsExporter
Torque Tool Lib
There may be others.. when you finish you should have just 7 projects in your solution counting your torque demo project.

12. Select "File --> Save TorqueDemo as..." and save your new project using the same name as the project folder (ie. mygame)

13. Back in the .\vs2005 folder, you can now delete the project files that correspond to the projects you just removed from the solution.
for version 1.4, I deleted these project files:
buildWad.vcproj
dtsSDK.vcproj
dtsSDKPlus.vcproj
fonttool.vcproj
langc.vcproj
map2dif plus.vcproj
map2dif.vcproj
max2dtsExporter_Max3.vcproj
max2dtsExporter_Max4.vcproj
max2mapExporter.vcproj
maya2dtsExporter_Maya6.vcproj
ms2dtsExporter.vcproj
Torque Tool Lib.vcproj
Pretty much delete any vcproj that didn't show in the dependancy list.

14. Going up one folder to the "mygame" directory, you can now delete the folders:
vc6 and vc7
pb
tools

15. Going down to the "lib" directory, you can now delete the folders:
dtsSDK
dtsSDKPlus
maxsdk31
maxsdk40
mayamacsdk5
mayasdk4
mayasdk5
mayasdk6
any folder associated with a vcproj you removed from vs2005

16. Going back to the .\vs2005 folder, rename the solution file "Torque SDK.sln" to your game name (ie. mygame.sln)

17. Delete the files Torque SDK.ncb, Torque SDK.opt,and Torque SDK.suo in .\vs2005

18. Open mygame.sln

19. Now you'll notice that the Torque Demo project in your solution is still named "Torque Demo" but if you look at its properties, you can see that it points to "mygame.vcproj" -- now we can rename it

20. Rename the "Torque Demo" project to match your game name (ie. MyGame)

21. Back in the .\vs2005 folder, you can now delte the files Torque Demo.vcproj, and Torque Demo.ncb -- there are still some "Torque Demo" files we have to rename, so don't delete any other "Torque Demo" files yet...

22. Still in the .\vs2005 folder, rename "TorqueDemo.rc" to match your game name (ie. mygame.rc)

23. In the solution explorer, expand your project and right-click on the "Source Files" folder, selct "Add --> Add Existing" and add your mygame.rc

24. Remove the TorqueDemo.rc

25. Now, expand your game project in the solution explorer until you get to "MyGame --> Source Files --> core" and double-click on TorqueConfig.h

26. Edit TORQUE_GAME_NAME

27. Edit TORQUE_GAME_VERSION_STRING

28. Save and close TorqueConfig.h

29. Scroll-up to the top of the solution explorer and highlight the solution

30. From the build menu, select "Configuration Manager" and set your solution to either "RELEASE" or "DEBUG" (probably want debug right now)

To compile to a diffrent folder select the project property page/Configuration Properties/Linker/General and set the output File path there
EDIT You have to do this for both the Release and the debug it's probably wise to add a _DEBUG to the name of the .exe but it's up to you. You can change the release and the debug from the selection box in the upper left of the dialog. Also, it might be a good idea to do the same thing for the glu2d3d and opengl2d3d projects within the solution. UNSURE if it is needed but you might want to copy the dll's OpenAL32.dll and wrap_oal.dll from the example folder over to your new folder. END EDIT

31. BEFORE you build your solution, close VC++ and COPY your entire mygame directory to c:\Torque (so you should have c:\Torque\mygame). Now rename this "mygame" folder to "template" -- now, you won't have to do all these steps all over for your next game or next attempt :-)

32. From the build menu, select "clean solution"

33. From the build menu, select "build solution"
If you did absolutely everything as above, you'll now have mygame.exe in your c:\mygame folder along with glu2d3d.dll and opengl2d3d.dll
Now, remember, your mygame.exe can't _do_ anything at this point because it needs a main.cs file and it needs a module to run.
To TEST your build, you can copy the folders "common" and "starter.fps" and the file main.cs from c:\Torque\SDK\example\ to c:\mygame. Edit main.cs and change the line
$defaultGame = "tutorial.base";
to
$defaultGame = "starter.fps";

Once you've tested to make sure the FPS works the same in your mygame folder as it does in the SDK\example folder, you should now delete the starter.fps folder and the common folder and get to work building your own game :-)

Next Steps:
Now, you'll probably want to change the icon for your game intead of using the torque.ico. Grab a copy of png2ico and edit your mygame.rc file to accomplish this.
To package your application when you are done, you'll need an installer. I recommend INNO_Setup for this (don't forget to grab the ispack as well).
#50
06/13/2006 (12:14 am)
Thanks, Ray! I got It compiled!!!!
#51
06/28/2006 (11:01 am)
I just got Torque 1.4 to build under Visual Studio .NET 2005 tonight. Its actually pretty simple when you know how. Just do the following:

1. Use the project conversion wizard to convert the project to Visual Studio .NET 2005.

2. Delete "basetsd.h" from the

Is all I see from the article - someone please help.
#52
06/28/2006 (11:09 am)
Well, I found the one on TDN - I hope that does it.
http://tdn.garagegames.com/wiki/Torque/vs2k5
#53
07/12/2006 (4:04 am)
Please can anyone send me a guide and files to compil Torque Shader Engine, to merhi8@hotmail.com? Please then your very very sweet. Thank you.

My problem is I have Visual Studio 2005 Standard Edition.

I too dont see the full article only two steps of it.
#54
07/16/2006 (4:52 am)
Original post is broken.
#55
07/19/2006 (1:45 am)
#56
07/25/2006 (12:29 am)
Original post is broken but Tank Dork's entry works fine and it is clean, i compiled the engine by using it. Thanks.

-B
#57
08/21/2006 (5:42 am)
Tank's entry is for Express... I'm sure it's easier when you have pro. Please advice... anyone...
#58
08/21/2006 (9:46 am)
It worked perfectly for me.
#59
10/19/2006 (2:01 pm)
worked perfect for my, with the: Tank Dork (May 12, 2006 at 03:23) tutorial!.
#60
10/19/2006 (9:06 pm)
Glad to have helped!