1.4 and RTS compiled and working
by Unsung Zero · in RTS Starter Kit · 01/18/2006 (9:32 pm) · 32 replies
I've gotten the RTS pack to compile with TGE 1.4. Below is what is needed to add or change in order for it to
compile correctly. This _does not_ include the community release for terrain deformation or other things. It is just
a port of the starter kit from 1.3 to 1.4. If you do incorporate the community snippets into 1.4, please share them
here.
First, copy over the files from the 1.3 RTS starter kit in \engine\game\RTS over to \engine\game\RTS
in your 1.4 source. Make sure to add them to your project file.
Next, copy over \engine\terrain\terrSelection.cc to the corresponding location in your 1.4 source. Again,
make sure to add it to your project.
In engine\game\gameProcess.cc
Find
Find
Find
In file \engine\game\shapeBase.h
Find
compile correctly. This _does not_ include the community release for terrain deformation or other things. It is just
a port of the starter kit from 1.3 to 1.4. If you do incorporate the community snippets into 1.4, please share them
here.
First, copy over the files from the 1.3 RTS starter kit in \engine\game\RTS over to \engine\game\RTS
in your 1.4 source. Make sure to add them to your project file.
Next, copy over \engine\terrain\terrSelection.cc to the corresponding location in your 1.4 source. Again,
make sure to add it to your project.
In engine\game\gameProcess.cc
Find
#include "core/dnet.h" #include "game/gameConnection.h" #include "game/gameBase.h" #include "game/shapeBase.h" #include "platform/profiler.h" #include "console/consoleTypes.h"and add below it
#include "game/RTS/visManager.h"
Find
mLastTime = targetTime; PROFILE_END(); return ret;and change it to
mLastTime = targetTime; gServerVisManager->processServer(); PROFILE_END(); return ret;
Find
mLastTime = targetTime; PROFILE_END(); return tickCount != 0;And change it to
mLastTime = targetTime; gClientVisManager->processClient(); PROFILE_END(); return tickCount != 0;
In file \engine\game\shapeBase.h
Find
typedef GameBase Parent; friend class ShapeBaseConvex; friend class ShapeBaseImageData; friend void physicalZoneFind(SceneObject*, void *);And replace it with
typedef GameBase Parent; friend class ShapeBaseConvex; friend class ShapeBaseImageData; friend class RTSUnit; friend void physicalZoneFind(SceneObject*, void *);
About the author
#22
03/29/2006 (8:37 pm)
Why dont you share the files instead of sharing code bits :) Would b a great help :)
#23
I went back and looked at every change I made recently, but didn't find anything wrong with them. The only files that show that they're getting the error are the win files included with TGE. There has to be a small ; error in winnt.h, right? How can I find it?
*Edit: "It" meaning the missing ;.
03/30/2006 (4:29 pm)
Agreed!I went back and looked at every change I made recently, but didn't find anything wrong with them. The only files that show that they're getting the error are the win files included with TGE. There has to be a small ; error in winnt.h, right? How can I find it?
*Edit: "It" meaning the missing ;.
#24
Do a GG site search for "winnt.h" and you should find a fix to your problem.
03/30/2006 (4:41 pm)
Your find the winnt.h in the "C:\Program Files\Microsoft SDK\include\" folder Do a GG site search for "winnt.h" and you should find a fix to your problem.
#25
I made the one change and went from 23 to 498. Heh. :{
(That is, #include was changed to #include "basetsd.h")
03/30/2006 (4:51 pm)
Torque Demo - 498 error(s), 78 warning(s)I made the one change and went from 23 to 498. Heh. :{
(That is, #include
#26
Edit: Found the problem: whenever I add
TextureHandle mSelectionTexture; // for RTS selection
to terrData.h, then the engine crash. Any clue for this?
04/02/2006 (3:15 am)
Anyone try merge this with the TLK 1.4? The engine crash when launch the demo mission.Edit: Found the problem: whenever I add
TextureHandle mSelectionTexture; // for RTS selection
to terrData.h, then the engine crash. Any clue for this?
#27
I'd really like to get this thing compiled. Can I send you the files via email or MSNm so you can take a glance at 'em? Can I get an email address or chat client info?
Gratzie.
04/08/2006 (1:08 pm)
Mike,I'd really like to get this thing compiled. Can I send you the files via email or MSNm so you can take a glance at 'em? Can I get an email address or chat client info?
Gratzie.
#29
04/28/2006 (12:33 pm)
Do the instructions above work?
#30
04/28/2006 (5:40 pm)
Yep and in TLK also I'm still merging some of the script files but it works so far. You will need to put in these http://www.garagegames.com/mg/forums/result.thread.php?qt=28024 changes also but I see you've already found those.
#31
a new install of TGE 1.4
with a VS2005 unzip and a
fresh install of RTS
I have completed the conversion (and will post from my notes soon)
see thread
http://www.garagegames.com/mg/forums/result.thread.php?qt=43627#333895
ver 1.4 conversion compilation of posts and a few more corrections
the thread will build a loadable RTS ver 1.4
however
no selection ring on units YET
mip map units are black instead of blue
multiplayer impossible (almost) client(host)
doesn't wait for you to select READY so it launches
too fast for a JOIN
working on resolving these 3 minor issues
04/29/2006 (9:26 am)
The above instructions are incomplete if you have havea new install of TGE 1.4
with a VS2005 unzip and a
fresh install of RTS
I have completed the conversion (and will post from my notes soon)
see thread
http://www.garagegames.com/mg/forums/result.thread.php?qt=43627#333895
ver 1.4 conversion compilation of posts and a few more corrections
the thread will build a loadable RTS ver 1.4
however
no selection ring on units YET
mip map units are black instead of blue
multiplayer impossible (almost) client(host)
doesn't wait for you to select READY so it launches
too fast for a JOIN
working on resolving these 3 minor issues
#32
Linking...
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static struct TerrSelectionInfo * TerrainRender::mTerrainSelections"
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static struct SelectionField __cdecl TerrainRender::TestSquareSelections(struct GridSquare *,int,class Point2I,struct SelectionField)
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static unsigned int TerrainRender::mDynamicSelectionCount"
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl TerrainRender::buildSelectionArray(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "public: void __thiscall VisManager::processServer(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "class VisManager * gServerVisManager"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "public: void __thiscall VisManager::processClient(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "class VisManager * gClientVisManager"
../tools/map2dif_plus.exe : fatal error LNK1120: 8 unresolved externals
05/01/2006 (4:47 pm)
Hey fellas, I was able to get the RTS kit to merge into 1.4 and execute the demo correctly, but I have a problem with the Map2Dif and Map2Dif Plus modules. After the changes were made I ran a full build on the whole kit and whamo... these are the errors I ran in to. Any ideas?Linking...
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static struct TerrSelectionInfo * TerrainRender::mTerrainSelections"
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static struct SelectionField __cdecl TerrainRender::TestSquareSelections(struct GridSquare *,int,class Point2I,struct SelectionField)
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static unsigned int TerrainRender::mDynamicSelectionCount"
engine.lib(terrRender.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl TerrainRender::buildSelectionArray(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "public: void __thiscall VisManager::processServer(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "class VisManager * gServerVisManager"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "public: void __thiscall VisManager::processClient(void)"
engine.lib(gameProcess.obj) : error LNK2019: unresolved external symbol "class VisManager * gClientVisManager"
../tools/map2dif_plus.exe : fatal error LNK1120: 8 unresolved externals
Torque Owner Mike Bell
It's more likely that you missed a semi-colon or a closing brace when copying and pasting another of the changes.
As you haven't mentioned this error in your previous posts, I'm guessing that it's probably caused by something that you've updated recently. You should go back through your changes in reverse order, and check to make sure you copied everything correctly. I would specifically look for a missing semi-colon or closing brace.
Let me know how you get on, I'm sure there's other ways around this if you get really stuck.