Game Development Community

Which files are new to put into my projetc tree ?

by Michael Schaumburg · in Torque Game Engine · 09/23/2005 (4:29 am) · 16 replies

I just bought the lightning pack and try to understand how to merge my project with the pack.
I read the migration guide to understand how it should work. There is written that I have to
copy all the files C++, cs and the Light Editor and the fxlighticon.png into my tree.
But how can I find all the new script files and the Light Editor in the lightning pack source tree ???
Do I have to search manually the complete tree and compare which I have or not ??
Sure I will make mistakes and then it will not work ...
Is there somewhere a list with all the files which are new ?

#1
09/23/2005 (8:34 am)
Hi Michael,

Hmmm, those instructions need to be more clear. Here are a list of the TLK directories:

The engine source files: "engine/synapseGaming"
The script files: "example/common/synapseGaming"

And the light icon is located at "example/common/editor/fxlighticon.png", though this should already be in the TGE example directory.

The current instructions assume you're familiar enough with merging that you'll move the missing directories and files over, however this is a little unclear and future instructions will be much better.

Let me know if this helps!

-John
#2
09/23/2005 (9:09 am)
Hi John,
first I am not so familiar how to integrate another source with my source, because I am not coming
from C++ programming. So far I have made a lot of changings to the engine, so I cannot continue
with your source, sorry.
I was looking with a tool to compare your directory with mine and I found a lot of more files which
are not in my tree. For example there are a lot of cs files in "example/starter.fps/server/scripts/sgLights.
So I think I also need them, and what about all the gui files ? I think the best is to have a clear list,
with all the files I have to copy into my tree.
Also what means "-Finally add the following files to the following Torque projects:" I realy don't know
what I have to do....
With this migration doc I am sure that I am not succesfull, sorry...
#3
09/23/2005 (10:07 am)
Hi Michael,

You only need to copy over the two directories ("engine/synapseGaming" and "example/common/synapseGaming"), and the light icon ("example/common/editor/fxlighticon.png"). The sgLights directory contains the demo's light datablock files, you can copy those over if you like, but it's not necessary.

The gui files are packaged in the "example/common/synapseGaming" directory.

After that you can start the merge (I recommend using WinMerge). I usually select the main TLK folder for the "Left" directory and the other torque directory for the "Right" (in this case your torque directory). For the file filter you can use "*.cc,*.h,*.c, *.cpp,*.asm,*.cs,*.gui,*.mk".

WinMerge will show you all of the file differences. To get started select a file and view the differences (you can scan through the differences using Alt-down), any difference within the comments:

//-----------------------------------------------
	// Lighting Pack code block
	//-----------------------------------------------
	...
	//-----------------------------------------------
	// Lighting Pack code block
	//-----------------------------------------------

Is for TLK. To merge the code into your source use Alt-right, which moves the code over into your source. Now both files should have the TLK code and comment. If a difference is not in a TLK comment block just ignore it. Continue doing this for all differences in all files.

The last step is to add the TLK source code to your Visual C++ or Xcode project files. Which are you using, and are you familiar with adding exiting files to the project?

-John
#4
09/23/2005 (10:29 am)
Hi John,
first thank you for your fast answer, thats also a reason why I stick to torque and this forum.
Your explaination makes it much more clearer now for me how to merge your source with mine.
It is good that I do not have to copy all the new files I found in your source. I am using VC6 but
sorry I am not so familiar how to add existing files to my project. For me every time I am happy
when I changed the engine code, compile it with out any errors ;)
#5
09/23/2005 (11:17 am)
Quote:
I am using VC6 but sorry I am not so familiar how to add existing files to my project

No problem, just open the Torque SDK, and in the project view (which usually lists all of the classes with little icons) select the FileView tab. Expand the Torque Demo project, and on the Source Files folder right-click and select New Folder (name it Torque Lighting Kit, TLK, or whatever you like).

Next right-click on the new folder, select Add Files to Folder and navigate to the "engine/synapseGaming/contentPacks/lightingPack" directory. Select the files listed in the Migration Guide for the Torque Demo project (you may need to change the File Types filter to All Files).

Follow this same process for each project listed in the Migration Guide.
#6
09/23/2005 (11:29 am)
I think it will need a bit until I finished with all but when I am succesfull I will write it here.
First, many thanks to you John who makes all much more clear to me !!!!
#7
09/23/2005 (4:25 pm)
Sure thing, let me know how it goes!
#8
09/24/2005 (12:27 pm)
Hi John,
first let me say I got the engine working, I didn't have the time to try all but the engine is running.
The new shadows are looking great in our level but we first have to relight the complete scene.
Now when I try to compile map2dif.exe I get a lot of errors. Maybe you have an idea and you can help
me.

engine.lib(sceneLighting.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: virtual __thiscall ConcretePolyList::~ConcretePolyList(void)" (??1ConcretePolyList@@UAE@XZ)
engine.lib(sceneLighting.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall ConcretePolyList::ConcretePolyList(void)" (??0ConcretePolyList@@QAE@XZ)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall CameraSpline::~CameraSpline(void)" (??1CameraSpline@@QAE@XZ)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: float __thiscall CameraSpline::advanceDist(float,float)" (?advanceDist@CameraSpline@@QAEMMM@Z)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: void __thiscall CameraSpline::value(float,struct CameraSpline::Knot *,bool)" (?value@CameraSpline@@QAEXMPAUKnot@1@_N@Z)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall CameraSpline::Knot::Knot(struct CameraSpline::Knot const &)" (??0Knot@CameraSpline@@QAE@ABU01@@Z)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: void __thiscall CameraSpline::push_back(struct CameraSpline::Knot *)" (?push_back@CameraSpline@@QAEXPAUKnot@1@@Z)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall CameraSpline::Knot::Knot(class Point3F const &,class QuatF const &,float,enum CameraSpline::Knot::Type,enum CameraSpline::Knot::Path)" (??0Knot@Camera
Spline@@QAE@ABVPoint3F@@ABVQuatF@@MW4Type@01@W4Path@01@@Z)
engine.lib(worldEditor.obj) : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall CameraSpline::CameraSpline(void)" (??0CameraSpline@@QAE@XZ)
../tools/map2dif.exe : fatal error LNK1120: 9 unaufgeloeste externe Verweise

Is it right that map2dif is the only tool which you changed with the lightning pack ??

Best regards Michael
#9
09/25/2005 (8:44 pm)
Hi Michael,

You need to add "collision/concretePolyList.cc" and "game/cameraSpline.cc" to the Torque Lib project. I think these are included in the VC7 project files and that's why they were not included in the Migration Guide.

-John
#10
09/26/2005 (6:07 am)
Hi John,
I got a problem with the Lightning Pack. I can only create a sgUniversalStaticLight.
I cannot create a fxLight and in the small window there are no fxLight Data.
The same for sgMissionLightingFilter, also no sgMissionLightingFilter Data.
The volumeLight has Data but I cannot create.
The log file said the following:

Compiling editor/newObject.cs...
Loading compiled script editor/newObject.cs.
editor/newObject.cs (0): Register object failed for object testfxLight of class fxLight.

Compiling editor/newObject.cs...
Loading compiled script editor/newObject.cs.
editor/newObject.cs (0): Register object failed for object testFilter of class sgMissionLightingFilter.

Compiling editor/newObject.cs...
Loading compiled script editor/newObject.cs.
editor/newObject.cs (0): Unable to instantiate non-conobject class volumeLight.

I was double checking all the merged files and I cannot find any mistakes or missing changings.
Please can you help me ???
#11
09/26/2005 (9:38 am)
I also checked the adding of the Lighting Pack '*.cc' files into my project but all is where it should be.
I did made a rebuild but still the same error message.....
#12
09/26/2005 (1:38 pm)
Hi Michael,

So map2dif builds properly now?


You need to create a new light datablock, before you can create the light objects (TLK lights work just like other TGE GameBase derived objects, they need a datablock full of information about how they work).

To create a new light datablock open the mission editor, then open TLK Light Editor (it's in the menu under Synapse Gaming Tools/Lighting Pack Light Editor if it's not there make sure all of the TLK script changes were made, check the Migration Guide for a list of the cs and gui files that are changed and use WinMerge to merge in the changes), and create a new datablock.

-John
#13
09/26/2005 (11:05 pm)
John,
I didn't check map2dif now because first I like to have working the light pack. I know the Light Editor and I understand
that I have to build a new datablock. But how do I slelect to build a datablock for the sgMissionLightingFilter or
for the fxLight ? Is it right that I have to merge also the volume light resource that I can create a volume light ?
Sorry for all the questions but for me it's realy hard to understand all.
#14
09/26/2005 (11:16 pm)
Under the Light Editor's 'Editor' menu you can select the light or filter editor.

The TLK dynamic lights replace fxLights.

Volume lights are already included in the TGE source (under game/fx/), if they're not in your project just copy over the files (vollight.cc vollight.h) and add them to your project.

After you created the new light datablock did it show up in the dropdown list? Are you using starter.fps for your game?
#15
09/26/2005 (11:26 pm)
I got it, huh, sometimes you must press me with my nose into the screen, sorry.
I was looking into my engine source. I do not have vollight.cc , vollight.h in my
game/fx directory. Can I take the files from the resource or are these files out
of date because the resource is quite old ??
PS. I do not use starter.fps as my folder but I changed the directory path if you
mean this......
#16
09/26/2005 (11:34 pm)
Use the files from the TLK source, they're in the engine/game/fx directory.

Quote:
PS. I do not use starter.fps as my folder but I changed the directory path if you
mean this......

Cool that's what I was getting at. :)