RTSKit and TGE1.5 how-to
by Guy Allard · in RTS Starter Kit · 10/28/2006 (4:18 am) · 81 replies
The completely unofficial, unsupported, DIY way to get the RTS kit to compile and run with TGE1.5 (also known as the 13 steps to enlightenment).
These Instructions assume that you are using VS2005, and that you can already compile TGE1.5 with it. If you're using a different compiler, you'll have to figure out how to set that up yourself.
Warning: Follow these instructions EXACTLY! Failure to do so may cause extreme stress!
Although I've tested for a couple of days, there may be issues with this conversion that I've not been lucky enough to experience yet.
These instructions, and the stuff I did to get it working with 1.5 are based heavily on William Fox's excellent RTSkit to 1.4 solution.
1) prepare:
Create a folder on you hard drive and name it RTSKitMerge
2) Install TGE1.5:
Install TGE1.5 (TorqueGameEngineSDK-1-5-0.exe) into the new RTSKitMerge folder.
De-select the 'Desktop Shortcut' and 'View Readme' check boxes when it asks you which components to install.
After this, you will have an RTSKitMerge\SDK folder containing the new TGE1.5 SDK. Don't do anything else with this yet!
3) Install RTS Starter Kit:
Install the RTS Starter Kit (RTSStarterKit-1-0.exe) into the RTSKitMerge folder.
Again, De-select the 'Desktop Shortcut' and 'View Readme' check boxes.
After this you will have the folders: RTSKitMerge\SDK and RTSKitMerge\RTSStarterKit
4) Copy RTS Kit source files:
Browse to the RTSKitMerge\RTSStarterKit\engine\game directory.
Right-click on the RTS folder, and choose copy from the pop-up menu.
Browse to the RTSKitMerge\SDK\engine directory.
Right click on the game folder, and choose paste from the pop-up menu.
You should now have the folder RTSKitMerge\SDK\engine\game\RTS which contains the RTS files
5) Copy terrSelection.cc:
Browse to the RTSKitMerge\RTSStarterKit\engine\terrain directory.
Right-click on the terrSelection.cc file, and choose copy from the pop-up menu.
Browse to the RTSKitMerge\SDK\engine directory.
Right-click on the terrain folder, and choose paste from the pop-up menu.
You should now have the file RTSKitMerge\SDK\engine\terrain\terrSelection.cc
These Instructions assume that you are using VS2005, and that you can already compile TGE1.5 with it. If you're using a different compiler, you'll have to figure out how to set that up yourself.
Warning: Follow these instructions EXACTLY! Failure to do so may cause extreme stress!
Although I've tested for a couple of days, there may be issues with this conversion that I've not been lucky enough to experience yet.
These instructions, and the stuff I did to get it working with 1.5 are based heavily on William Fox's excellent RTSkit to 1.4 solution.
1) prepare:
Create a folder on you hard drive and name it RTSKitMerge
2) Install TGE1.5:
Install TGE1.5 (TorqueGameEngineSDK-1-5-0.exe) into the new RTSKitMerge folder.
De-select the 'Desktop Shortcut' and 'View Readme' check boxes when it asks you which components to install.
After this, you will have an RTSKitMerge\SDK folder containing the new TGE1.5 SDK. Don't do anything else with this yet!
3) Install RTS Starter Kit:
Install the RTS Starter Kit (RTSStarterKit-1-0.exe) into the RTSKitMerge folder.
Again, De-select the 'Desktop Shortcut' and 'View Readme' check boxes.
After this you will have the folders: RTSKitMerge\SDK and RTSKitMerge\RTSStarterKit
4) Copy RTS Kit source files:
Browse to the RTSKitMerge\RTSStarterKit\engine\game directory.
Right-click on the RTS folder, and choose copy from the pop-up menu.
Browse to the RTSKitMerge\SDK\engine directory.
Right click on the game folder, and choose paste from the pop-up menu.
You should now have the folder RTSKitMerge\SDK\engine\game\RTS which contains the RTS files
5) Copy terrSelection.cc:
Browse to the RTSKitMerge\RTSStarterKit\engine\terrain directory.
Right-click on the terrSelection.cc file, and choose copy from the pop-up menu.
Browse to the RTSKitMerge\SDK\engine directory.
Right-click on the terrain folder, and choose paste from the pop-up menu.
You should now have the file RTSKitMerge\SDK\engine\terrain\terrSelection.cc
About the author
Recent Threads
#42
07/14/2007 (2:19 pm)
Is there a patch for TGE 1.5.2? I seem to have one file that doesn't take the .1 patch well. Anyone know? Thanks
#43
Thanks for the help!
07/22/2007 (2:05 pm)
When you say "here is the patch for the patch" do we do both patches, or just the most updated one? Thanks for the help!
#44
Remember it is for 1.5.1, I havent update to 1.5.2 yet.
07/23/2007 (3:36 pm)
You must download the original patch, and replace the RTSKitPatch.patch (Its just a test file with the info of the lines to be replaced) with the one I post. Then apply it only once.Remember it is for 1.5.1, I havent update to 1.5.2 yet.
#45
Around line 98 add this
08/06/2007 (7:04 pm)
The 1.5.1 patch doesnt put "struct SelectionField" code into terrRender.hAround line 98 add this
enum TerrSelectionConstants {
MaxTerrainSelections = 256,
SelectionInts = (MaxTerrainSelections - 1) / 32 + 1,
};
struct SelectionField
{
U32 mBits[SelectionInts];
SelectionField()
{
clear();
}
SelectionField(const SelectionField& field)
{
*this = field;
}
bool test(U32 index)
{
//no checking for out of bounds for performance reasons...
U32 word = index / 32;
U32 bit = index % 32;
return mBits[word] & (1 << bit);
}
void set(U32 index)
{
U32 word = index / 32;
U32 bit = index % 32;
mBits[word] |= 1 << bit;
}
void clear()
{
for (U32 k = 0; k < SelectionInts; k++)
{
mBits[k] = 0x00000000;
}
}
bool isEmpty()
{
for (U32 k = 0; k < SelectionInts; k++)
{
if (mBits[k])
return false;
}
return true;
}
SelectionField& operator=(const SelectionField& field)
{
for (U32 k = 0; k < SelectionInts; k++)
{
mBits[k] = field.mBits[k];
}
return *this;
}
operator bool()
{
return !isEmpty();
}
};
#46
Note: that at least gets TerrainSelection.cc to compile
Still working on the rest
08/06/2007 (7:09 pm)
Open the patch for 1.5.1 into notepad and compare terrRender.h to the TerrRender.h in source it doesnt match all the way.Note: that at least gets TerrainSelection.cc to compile
Still working on the rest
#47
Successful build of 1.5.2, but I dont know how to make patch files, I also have several other things in there that dont pertain to the rts kit, like the tankpack and guiFlash. Can anyone explain how to just locate the files for the rts and create a patch
08/06/2007 (8:04 pm)
Build log was saved at "file://e:\Torque\TGE_1_5_2\engine\out.VC8.RELEASE\BuildLog.htm" Torque Demo - 0 error(s), 1 warning(s) ========== Build: 7 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Successful build of 1.5.2, but I dont know how to make patch files, I also have several other things in there that dont pertain to the rts kit, like the tankpack and guiFlash. Can anyone explain how to just locate the files for the rts and create a patch
#48
diff -r -c > patch.file
I could really use this myself as I just bought the RTS starter kit to use with TGE 1.5.2.
08/07/2007 (9:40 am)
I'm not sure how you would separate the files, but I think you could create the patch with:diff -r -c
I could really use this myself as I just bought the RTS starter kit to use with TGE 1.5.2.
#49
You can get it HERE
Credits go to the guys that did the patch files, my bro and I, and the rts people in this forum whos code helped out.
There it is have fun with 1.5.2
08/07/2007 (6:05 pm)
Here is the 1.5.2 build tested and working, in the zip the folders are named in order, this build was made using VE 2005, and the changed VE files are included. This is working with a fresh download so no one will need to worry about getting any of mixed code. You can get it HERE
Credits go to the guys that did the patch files, my bro and I, and the rts people in this forum whos code helped out.
There it is have fun with 1.5.2
#50
I got it to compile with no errors. I launch the game, everything seems to be working fine. I click to start a game and go to the lobby. This is where I'm having trouble, I can't click on any of the buttons to launch the game. I click and it does nothing. Anyone else seen this?
Console Errors:
08/08/2007 (5:18 am)
Thanks for this Brian.I got it to compile with no errors. I launch the game, everything seems to be working fine. I click to start a game and go to the lobby. This is where I'm having trouble, I can't click on any of the buttons to launch the game. I click and it does nothing. Anyone else seen this?
Console Errors:
starter.RTS/client/ui/mainMenuGui.gui (132): Unable to instantiate non-conobject class RTSConnection. Set::add: Object "ServerConnection" doesn't exist starter.RTS/client/ui/mainMenuGui.gui (134): Unable to find object: '0' attempting to call function 'setConnectArgs' starter.RTS/client/ui/mainMenuGui.gui (135): Unable to find object: '0' attempting to call function 'setJoinPassword' starter.RTS/client/ui/mainMenuGui.gui (136): Unable to find object: '0' attempting to call function 'connectLocal' Exporting server prefs... starter.RTS/client/ui/mainMenuGui.gui (132): Unable to instantiate non-conobject class RTSConnection. Set::add: Object "ServerConnection" doesn't exist starter.RTS/client/ui/mainMenuGui.gui (134): Unable to find object: '0' attempting to call function 'setConnectArgs' starter.RTS/client/ui/mainMenuGui.gui (135): Unable to find object: '0' attempting to call function 'setJoinPassword' starter.RTS/client/ui/mainMenuGui.gui (136): Unable to find object: '0' attempting to call function 'connectLocal' Exporting server prefs... starter.RTS/client/ui/mainMenuGui.gui (132): Unable to instantiate non-conobject class RTSConnection. Set::add: Object "ServerConnection" doesn't exist starter.RTS/client/ui/mainMenuGui.gui (134): Unable to find object: '0' attempting to call function 'setConnectArgs' starter.RTS/client/ui/mainMenuGui.gui (135): Unable to find object: '0' attempting to call function 'setJoinPassword' starter.RTS/client/ui/mainMenuGui.gui (136): Unable to find object: '0' attempting to call function 'connectLocal' keyboard0 input device unacquired.
#51
edit: If that doesnt work, just try and copy over the starter.rts again from your pack and not the one I provided, maybe something didnt get copied....
08/09/2007 (7:24 am)
Did you copy the files this needed from the common folder of the old rts example folder?Quote: Quote by Guy Allard: 7) Copy common script files:
Browse to the RTSKitMerge\RTSStarterKit\example\common\server directory.
CTRL-select these 3 files: server.cs, prefs.cs and clientConnection.cs
Right-click on one of the files, and choose copy from the pop-up menu.
Browse to the RTSKitMerge\SDK\example\common directory.
Right-click on the server folder, and select paste from the pop-up menu. Answer 'yes to all' when it asks you if you want to over-write existing files.
edit: If that doesnt work, just try and copy over the starter.rts again from your pack and not the one I provided, maybe something didnt get copied....
#52
Its working now :)
08/09/2007 (8:49 am)
I seen what it was. I had compiled a debug version of the exe and didn't realize the batch file was calling the release build that wasn't updated.Its working now :)
#53
08/10/2007 (8:03 pm)
@Brian: I am little confused. To which folder am I supposed to apply the patch and copy over the files in your zip file, the TGE_1_5_2 folder or the RTSStarterKit folder?
#54
NOTE: apply the patch before you paste or you will error out, the patch is for 1.5.1 and will replace the files my brother and I have already fixed.
I suggest backing up your 1.5.2 directory before you incoporate.
08/13/2007 (6:09 am)
The patch goes on top of the 1.5.2 files that your planning to incorporate the rts kit, then you paste the files Ive given you on top of your 1.5.2 files in the places given in the other folder.NOTE: apply the patch before you paste or you will error out, the patch is for 1.5.1 and will replace the files my brother and I have already fixed.
I suggest backing up your 1.5.2 directory before you incoporate.
#55
1) Extracted a clean/stock copy of TGE 1.5.2
2) Applied your patch from the "1 Run this first" folder
3) Copied the files from "2 Copy Paste this next"
4) Compiled the whole thing with VS2005
It does seem to work (except for that assert where it was complaining about a buffer being to small, which I enlarged). Let me know if I did anything wrong.
08/13/2007 (7:45 pm)
I think I got it now, but I did have to fix one assert in GuiMapHud::onRender(). Here's what I did:1) Extracted a clean/stock copy of TGE 1.5.2
2) Applied your patch from the "1 Run this first" folder
3) Copied the files from "2 Copy Paste this next"
4) Compiled the whole thing with VS2005
It does seem to work (except for that assert where it was complaining about a buffer being to small, which I enlarged). Let me know if I did anything wrong.
#56
Some kind of error in the dts maybe
Anyone else have this problem????
08/16/2007 (6:08 pm)
The only problem Im having is the rifleman and the shocker dont show up..Some kind of error in the dts maybe
Anyone else have this problem????
#57
08/16/2007 (6:16 pm)
It would be nice if it worked with TGEA
#58
08/16/2007 (7:43 pm)
Yeah, now that you mention it, you're right. There are a bunch of errors and warnings in the log related to DTS files.
#59
In starter.RTS\server\scripts\core\gameConnection.cs at around line 103 change this:
to:
(i.e. add an mAbs call around the "%index % 3"
08/19/2007 (11:43 am)
I found the problem with the rifleman and shocker not showing up. It would seem they fixed the mod (%) operator in 1.5.2 (or somewhere before) to correctly handle negative numbers. Anyway, here's the fix for that:In starter.RTS\server\scripts\core\gameConnection.cs at around line 103 change this:
function RTSConnection::createPlayer(%this, %spawnPoint, %index)
{
switch(%index % 3)
{
case 0:
%data = botBlock;to:
function RTSConnection::createPlayer(%this, %spawnPoint, %index)
{
switch(mAbs(%index % 3))
{
case 0:
%data = botBlock;(i.e. add an mAbs call around the "%index % 3"
#60
I have C:\GameName\1.5.2\PatchFilesHere.
It doesnt seem to do anything, Except run to "command?" boxes and they dont do anything or disapear?
Im using Windows Vista.
Please help?
08/29/2007 (2:50 pm)
Im having a problem with the patcher, It doesnt seem to work, Where exactly do i place this?I have C:\GameName\1.5.2\PatchFilesHere.
It doesnt seem to do anything, Except run to "command?" boxes and they dont do anything or disapear?
Im using Windows Vista.
Please help?
Torque 3D Owner Novack
CyberianSoftware
I just replace the diferent line the patch searh for.
BTW, i just uploaded the RTSKitPatch.patch, so download the complete patch anyway, and then overwrite the original file with this one.