Merge with RTS starter kit
by Affectworks · in · 01/26/2005 (11:13 am) · 28 replies
Has anyone been able to merge the Lighting pack with the RTS starter kit? I have been working with this for a couple days and can easily get a successful compile but undesirable results, namely... well, The Lights Don't Work! I could go into more detail in my struggles if someone would like me to, but I'm more interested if anyone else has successfully achieved this task and if you have any suggestions or tips as to duplicate your feat.
Thanks
Thanks
#2
After compiling the merged project (this is just the RTS with the Lighting Pack) I ran one of the RTS maps and I can see that it is much brighter and I'm pretty sure this is a good sign :) However as I try to add a sgUniversalStaticLight (for example) there is no list in the control below one where I enter my Object Name.
I am new with this build (of course or else why would I need this thread) but the synapse demo was very easy to add lights and this pull-down bar was full of options.
Thanks for you help.
01/26/2005 (1:30 pm)
Thank you for your reply,After compiling the merged project (this is just the RTS with the Lighting Pack) I ran one of the RTS maps and I can see that it is much brighter and I'm pretty sure this is a good sign :) However as I try to add a sgUniversalStaticLight (for example) there is no list in the control below one where I enter my Object Name.
I am new with this build (of course or else why would I need this thread) but the synapse demo was very easy to add lights and this pull-down bar was full of options.
Thanks for you help.
#3
Let me know if this helps!
-John
01/26/2005 (4:22 pm)
Double check to make sure all of the Lighting Pack script changes and files were properly merged. Then open the Light Editor, create a new light datablock, and save it. Now try creating a mission light object the pop up dialog should contain your new datablock.Let me know if this helps!
-John
#4
01/26/2005 (5:25 pm)
It's actually easier, imho, to merge the RTS kit into the Lighting Pack, as opposed to the other way around. I've done this without much of a hitch...I think I recall some oddness with explosion.cc dealing with the projectiles and stuff, but other than that it was pretty straightforward.
#5
Is there a correct or incorrect exec order in init.cs?
Hopefully I have been clear enough and have offered enough clues.
Thanks you both for your replies.
01/27/2005 (7:29 am)
Thank you so much for all your help so far! I have indeed checked and rechecked and then of course checked again after your suggestion, but the merger to the best of my knowledge appears to be complete. I will let you know that the lighting is working however, I loaded up the map with the blue light and the red light and they are glowing beautifully, however my problem still remains. I create new datablocks and they aren't showing up in the pull-down box when the light instance is added to the map. I have noticed a few more issues that could help pinpoint the problem to anyone that knows this package better then me. I notice that there is no icon of a lightbulb where there is one when I run the map from the synapseDemo compile. Also more interesting and something I am currently looking into, there are no .dso compiles of the cs files in the sgLights folder in the server\scripts folder nor are there in the server\scripts folder itself beyond the globals.cs file which is compiled.Is there a correct or incorrect exec order in init.cs?
Hopefully I have been clear enough and have offered enough clues.
Thanks you both for your replies.
#6
Problem: After successful compilation of the merged project I found that my Datablock pull-down bar was not populating with the pre-made lighting datablocks. I also noticed that my little icon of a light bulb wasn't showing but the most important issue was that I couldn't save my own datablocks either.
Solution: The RTS kit uses a core folder inside the server/scripts instead of just the server/scripts folder itself. Inorder to get the new structure to work correctly you need to merge the files form the SYNAPSE project starter.fps\server\scripts => starter.RTS\server\scripts\core
You will need to make sure you have the merger of //LIGHING PACK// BLOCK, into the game.cs file in that folder and then go into the sgLights.cs file and change line 6 to point to the sgLights folder (don't forget if you need to, to change the starter.fps/server/... => starter.RTS/server/... )
Thanks, you guys, for your help.
01/27/2005 (8:09 am)
OK... well I just fixed my problem thank you both for all your help. For all of you that are trying to get the lighting pack to work with the RTS kit... Here is what I had to do to get it to work correctly. Problem: After successful compilation of the merged project I found that my Datablock pull-down bar was not populating with the pre-made lighting datablocks. I also noticed that my little icon of a light bulb wasn't showing but the most important issue was that I couldn't save my own datablocks either.
Solution: The RTS kit uses a core folder inside the server/scripts instead of just the server/scripts folder itself. Inorder to get the new structure to work correctly you need to merge the files form the SYNAPSE project starter.fps\server\scripts => starter.RTS\server\scripts\core
You will need to make sure you have the merger of //LIGHING PACK// BLOCK, into the game.cs file in that folder and then go into the sgLights.cs file and change line 6 to point to the sgLights folder (don't forget if you need to, to change the starter.fps/server/... => starter.RTS/server/... )
Thanks, you guys, for your help.
#7
I had exactly the same problem with the light pack (as have a few others I have seen on the forums), possibly because you expect the problem to be with one of your own scripts and not the new ones?
How about putting an Echo line in the sgLights.cs file saying something along the lines of - "You may need to change the path on line XX in sgLights.cs" so that at least there would be some hint in the console.log when you first try the pack.
Apart from that one little niggle, its a great addition to Torque :)
01/30/2005 (9:39 am)
@John KabusI had exactly the same problem with the light pack (as have a few others I have seen on the forums), possibly because you expect the problem to be with one of your own scripts and not the new ones?
How about putting an Echo line in the sgLights.cs file saying something along the lines of - "You may need to change the path on line XX in sgLights.cs" so that at least there would be some hint in the console.log when you first try the pack.
Apart from that one little niggle, its a great addition to Torque :)
#8
Each build of my engine I have "things_I_Changed.txt" file with line numbers, code date, notes etc. When I get a new light pack build I just go in item by item add my stuff back in and blam about 2 hours and Im up and running.
02/09/2005 (5:58 am)
I did the same as James and merged my changes to the lightpack code with no problems.Each build of my engine I have "things_I_Changed.txt" file with line numbers, code date, notes etc. When I get a new light pack build I just go in item by item add my stuff back in and blam about 2 hours and Im up and running.
#9
That's a great idea. You might also want to check out a diff tool like WinMerge, it will allow you to safely merge the latest Lighting Pack code into your source in seconds. It's easy because all of the Lighting Pack changes are commented like so:
Hope this helps!
-John
02/09/2005 (12:58 pm)
Hi Howard,That's a great idea. You might also want to check out a diff tool like WinMerge, it will allow you to safely merge the latest Lighting Pack code into your source in seconds. It's easy because all of the Lighting Pack changes are commented like so:
void TSStatic::initPersistFields()
{
Parent::initPersistFields();
addGroup("Media");
addField("shapeName", TypeFilename, Offset(mShapeName, TSStatic));
endGroup("Media");
[b] //-----------------------------------------------
// Lighting Pack code block
//-----------------------------------------------
sgInitPersistFields();
//-----------------------------------------------
// Lighting Pack code block
//-----------------------------------------------[/b]
}Hope this helps!
-John
#10
I am using VC++ 7 which compiles both without problem right now.
Thanks.
03/11/2005 (9:22 pm)
I've got WinMerge. Could someone give me a brief tutorial on how to merge the lighting kit into the RTS tree and then the TGE tree.I am using VC++ 7 which compiles both without problem right now.
Thanks.
#11
I've sent you a reply responding to the questions in your email.
-John
03/12/2005 (7:55 am)
Hi Richard,I've sent you a reply responding to the questions in your email.
-John
#12
One problem. The green halos that appeared around characters when selected in RTS has gone away. Any suggestions of where that particular piece of code lives and how to make sure it's functional again?
I tried adding the files and script changes mentioned above.
Thanks,
r.b.
03/12/2005 (9:37 pm)
I've successfully combined the Lightning Kit and the RTS code. It compiles and runs just fine. Looks really cool.One problem. The green halos that appeared around characters when selected in RTS has gone away. Any suggestions of where that particular piece of code lives and how to make sure it's functional again?
I tried adding the files and script changes mentioned above.
Thanks,
r.b.
#13
Much as I enjoy the occasional bug hunt, one of the reasons I buy software like the TGE and Synapse is because I have a day job and when I am coding on my game I want to focus on being creative. I do this to relax, not more headaches. :-)
r.b.
03/12/2005 (10:06 pm)
Or maybe just offer a merged version for download for people who hold both licenses? I've got it working to a degree, but I really don't want to spend a week tracking down some minute setting. Much as I enjoy the occasional bug hunt, one of the reasons I buy software like the TGE and Synapse is because I have a day job and when I am coding on my game I want to focus on being creative. I do this to relax, not more headaches. :-)
r.b.
#14
Chances are you've accidentally replaced some of this code with:
Using WinMerge move the original RTS code back into your source, then add the Lighting Pack code before or after the entire 'sgCurrSelectionTris' if statement's block of code.
03/13/2005 (4:32 am)
Re-run WinMerge against your LP+RTS and a clean RTS, then select 'terrRender.cc', and go to the last difference. You'll notice a block of code starting with://selections...
if (sgCurrSelectionTris) {
...Chances are you've accidentally replaced some of this code with:
//-----------------------------------------------
// Lighting Pack code block
//-----------------------------------------------
sgTerrain::sgRenderBlockEnd();
//-----------------------------------------------
// Lighting Pack code block
//-----------------------------------------------Using WinMerge move the original RTS code back into your source, then add the Lighting Pack code before or after the entire 'sgCurrSelectionTris' if statement's block of code.
#15
After the merge I have checked that random files have lighting pack code blocks in them and they do, I have also move the volLight.c and .hh across to /game/fx and the synapselighting directory as well.
Upon trying to then compile I get about 40 errors or so from vs.net 2K3, so any advise, help, step-by-steps would be most appreciated :)
04/13/2005 (7:34 pm)
Well, figured I should post to this thread since I'm having a hell of a time getting the merge to work. Using winmerge I have tried to merge the lighting pack into RTS, finding 85 files with differences between them and hitting the copy (left) button to do the merge.After the merge I have checked that random files have lighting pack code blocks in them and they do, I have also move the volLight.c and .hh across to /game/fx and the synapselighting directory as well.
Upon trying to then compile I get about 40 errors or so from vs.net 2K3, so any advise, help, step-by-steps would be most appreciated :)
#16
There are only a hand full of files altered by the Lighting Pack (definitely not 80+), chances are a lot of the changes being detected are from the RTS Kit or are differences in whitespace (you can disable the whitespace check in WinMerge; select Edit->Options select the Compare tab and set the Whitespace to Ignore Changes).
Most of the files only have one or two changes, all are clearly marked with the Lighting Pack code block comment:
Make sure to merge the Lighting Pack into the RTS Kit. When using the Copy Left (or right) make sure you're moving the Lighting Pack code block and not TGE code too (definitely don't Copy Left the whole file, it may over write RTS code).
Also check out the Migration Guide for more pointers.
Let me know if this helps!
-John
04/13/2005 (8:48 pm)
Hi Bradley,There are only a hand full of files altered by the Lighting Pack (definitely not 80+), chances are a lot of the changes being detected are from the RTS Kit or are differences in whitespace (you can disable the whitespace check in WinMerge; select Edit->Options select the Compare tab and set the Whitespace to Ignore Changes).
Most of the files only have one or two changes, all are clearly marked with the Lighting Pack code block comment:
//----------------------------------------------- // Lighting Pack code block //----------------------------------------------- ... //----------------------------------------------- // Lighting Pack code block //-----------------------------------------------
Make sure to merge the Lighting Pack into the RTS Kit. When using the Copy Left (or right) make sure you're moving the Lighting Pack code block and not TGE code too (definitely don't Copy Left the whole file, it may over write RTS code).
Also check out the Migration Guide for more pointers.
Let me know if this helps!
-John
#17
04/13/2005 (9:10 pm)
Or the Lighting Pack folks could do it for us and make their customers happy.
#18
04/13/2005 (9:25 pm)
I have no way of controlling who has access to a Lighting Pack + RTS Kit, so obviously I can't make that code available.
#19
Think that copying the TGE code is the problem too, as I was using the engine directories for both packs, getting WinMerge to compare them both including subdirectories and then merging so seems that was wrong :)
04/13/2005 (9:50 pm)
Thanks for that info John, will try it when I get back home from clean installs and let you know how it goes. Think that copying the TGE code is the problem too, as I was using the engine directories for both packs, getting WinMerge to compare them both including subdirectories and then merging so seems that was wrong :)
#20
The object is to sell more licences. How many licenses do you think this discussion has sold?
If sell through isn't an option, then come up with a script to do the merge for the customer. It just doesn't make sense to have us mess with this the way we do.
What happens with the next improvement in physics or sound or whatever? Another set of hours wasted trying to shoehorn that code in?
Ridiculous.
04/14/2005 (8:16 am)
So I would suggest cutting a deal with GG to sell a merged version. I mean really, why all this pain when a cooperative agreement benefits everyone?The object is to sell more licences. How many licenses do you think this discussion has sold?
If sell through isn't an option, then come up with a script to do the merge for the customer. It just doesn't make sense to have us mess with this the way we do.
What happens with the next improvement in physics or sound or whatever? Another set of hours wasted trying to shoehorn that code in?
Ridiculous.
Torque Owner John Kabus (BobTheCBuilder)