Game Development Community

Editing Source Code

by Drew Madsen · in Torque Game Engine · 07/22/2009 (5:39 pm) · 9 replies

Doesn't seem to be a clear explanation on how to use visual c++ 2008 Express to compile TGE.

Is all I need to do open the sln file in the Vc7 folder in the torque directory, edit files as needed then compile?

Seems like there were a few posts that gave me the feeling that VC2008 doesn't work to compile or it has to be changed some how to get it to work.

#1
07/22/2009 (6:52 pm)
I use VS2008Express, and it works simply and without problems. In fact I just reinstalled TGE a week ago to test something for someone so the procedure is still fresh in my mind.

Open VS2008Express -> File -> Open -> Project/Solution -> Navigate to the ".../Torque1_5_2/VS2005" directory and open the TorqueSDK.sln file. You will be asked if yo wish to update the solution and projects because they are out of date. Do so. There will be a few warnings but all will be well. Once the conversion is done you are ready to compile the solution and/or projects.

It's that easy. From there you're ready to edit and compile as you please. You will have to make the determination of whether to compile a Debug build or a Release buils, but that's as simple as picking one or the other from a drop-down box.
#2
07/22/2009 (6:54 pm)
EDIT: Whoa! Bizarre double post.
#3
07/22/2009 (7:20 pm)
Is there a tutorial on how to do this? I followed the one on TDN but the Torque demo project ended up with 44 errors (I didn't touch it).
#4
07/22/2009 (7:35 pm)
Downloading a freash copy of 1.5.2

http://tdn.garagegames.com/wiki/Code/Visual_C_Project_SDK

is what I was using to reference.

Is there a list with the projects I have to build for the game to run?

There were a number it listed as being unneeded but it didn't say which ones I should keep or if maybe there are some new ones since that was written that I can now delete.
#5
07/23/2009 (7:10 am)
I compiled the fresh copy and got the same results.
"
7>Microsoft Browse Information Maintenance Utility Version 9.00.30729
7>Copyright (C) Microsoft Corporation. All rights reserved.
7>Build log was saved at "file://c:TorqueTGE_1_5_2_TEMPLATEengineout.VC7.DEBUGBuildLog.htm"
7>Scrapped - 42 error(s), 0 warning(s)
========== Build: 6 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
"
projects compiled:
glue2d3d
ljpeg
lpng
lungif
opengl2d3d
zlib
Scrapped(Torque Demo File)

All the errors seem to be type cast in the Torque Demo Project, Error C2644 and C2440.

everything else compiles correctly.

Any solutions?
#6
07/23/2009 (9:41 am)
Quote:
"file://c:TorqueTGE_1_5_2_TEMPLATEengineout.VC7.DEBUGBuildLog.htm"
It looks like you're using one of the "VC" directory solutions. Don't use the projects/solution in the VC7 directories, use those in the VS2005 directory and all will be fine in VS Express.
#7
07/23/2009 (1:34 pm)
Yep yep, I did that and it seems to be working when I transplant the FPS Common, Starter.fps, and main.cs

One difference I did notice though is the "OpenAL drivers failed to initialized" when I start the game.

Anything I should be worried about?

((It doesn't happen on the example build that comes with the SDK))
#8
07/23/2009 (2:19 pm)
I believe you still have to transplant the OpenAl dll's too, I don't think that TGE actually has a OpenAl dll project that get's built. I do know that TGEa and Torque 3D can use the system dll's (especially T3D).
#9
07/24/2009 (7:56 am)
Oki dok, thanks for the info!