Game Development Community

RTS Pack with 1.4 Release candidate 1

by David Dougher · in RTS Starter Kit · 03/27/2005 (7:10 am) · 9 replies

The following are a list of changes I found in the RTS Pack that are necessary to make it work with the 1.4 Release Candidate 1

RTS/guiMapHud.cc - 1 change
Line near 57
mConnection = GameConnection::getServerConnection();
should be
mConnection = GameConnection::getConnectionToServer();

----------------------
RTS/guiMapHud.h - 1 change
Line near 9
#include "gui/guiTSControl.h"
should be
#include "gui/core/guiTSControl.h"

----------------------------
RTS/guiMapHudGen.cc - 1 change
Line near 97
mConnection = GameConnection::getServerConnection();
should be
mConnection = GameConnection::getConnectionToServer();

--------------------------------
RTS/guiMapHudRender.cc - 1 change
Line near 10
RTSConnection* conn = (RTSConnection*)NetConnection::getServerConnection();
Should be
RTSConnection* conn = (RTSConnection*)NetConnection::getConnectionToServer();

------------------------
RTS/guiRTSTSCtrl.cc - 3 changes
Line near 10
#include "gui/guiCanvas.h"
should be
#include "gui/core/guiCanvas.h"

Line near 341
RTSConnection* conn = dynamic_cast(NetConnection::getServerConnection());
Should be
RTSConnection* conn = dynamic_cast(NetConnection::getConnectionToServer());

Line near 390
RTSConnection* conn = (RTSConnection*)NetConnection::getServerConnection();
Should be
RTSConnection* conn = (RTSConnection*)NetConnection::getConnectionToServer();

-----------------------
RTS/RTSCamera.cc - 2 changes
Line near 165
GameConnection *conn = GameConnection::getServerConnection();
Should be
GameConnection *conn = GameConnection::getConnectionToServer();

Line near 402
GameConnection *conn = GameConnection::getServerConnection();
Should be
GameConnection *conn = GameConnection::getConnectionToServer();

---------------------------
RTS/RTSConnection.cc - 6 changes
Line near 48
if(con->isServerConnection())
Should be
if(con->isConnectionToServer())

Line near 254
if( isServerConnection() )
Should be
if( isConnectionToServer() )

Line near 269
if (!isServerConnection())
Should be
if (!isConnectionToServer())

Line near 275
if (!isServerConnection())
Should be
if (!isConnectionToServer())

Line near 286
if (!isServerConnection())
should be
if (!isConnectionToServer())

Line near 330
if(!object->isServerConnection())
Should be
if(!object->isConnectionToServer())

------------------
RTS/RTSUnit.cc - 3 changes
Line near 628
GameConnection* connection = GameConnection::getServerConnection();
Should be
GameConnection* connection = GameConnection::getConnectionToServer();

Line near 829
GameConnection *con = GameConnection::getServerConnection();
Should be
GameConnection *con = GameConnection::getConnectionToServer();

Line near 875
GameConnection *con = GameConnection::getServerConnection();
Should be
GameConnection *con = GameConnection::getConnectionToServer();


Anybody run across any others?

About the author

Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence


#1
04/02/2005 (1:40 pm)
Thanks for looking into this, David. When we get 1.4 out of RC mode, we'll officially update the various content packs. Till then, it's awesome to see the community stepping up to the plate!
#2
12/27/2005 (7:34 am)
Thanks,
Also need to change RTS\GuiRTSTSCtrl.h

In enum PanEdge rename the 'bit' function to 'BIT'
#3
01/05/2006 (2:01 pm)
Worked for me thanks, also had to move some private sections into protected sections as suggested by
www.garagegames.com/mg/forums/result.thread.php?qt=37286

I had the error
... cannot access private member declared in class ...

In shapeBase.h:
I had to move mSoundThread, the whole Thread struct, and mScriptThread
to the protected section of code, making sure that the whole thread struct
was declared before mScriptThread.
#4
01/13/2006 (6:38 pm)
In guiRTSTSCtrl.h, near line 46 (or so):

Change
enum PanEdge {
EdgeNone = bit(0),
EdgeLeft = bit(1),
EdgeRight = bit(2),
EdgeTop = bit(3),
EdgeBottom = bit(4)
};

to

enum PanEdge {
EdgeNone = BIT(0),
EdgeLeft = BIT(1),
EdgeRight = BIT(2),
EdgeTop = BIT(3),
EdgeBottom = BIT(4)
};

---- NOTE:
I have mucked around with guiRTSCtrl.h so much with my current project that this might not even be in the original - please correct me if I'm wrong.
#5
01/18/2006 (6:39 pm)
Just purchased the RTS Pack finally. Excellent and the addon's are pretty nice for it as well. What is the status of getting it over to 1.4?
#6
01/18/2006 (9:00 pm)
If you take the stock 1.4 and add RTS with the above changes, it appears to work properly, except you don't get the green circle around your selections. For that, you'll need to make quite a few changes in engine/terrain to terrData.[cc/h] and terrRender.[cc/h]. Also, you need to copy over terrSelection.cc from the 1.3 RTS pack.
#7
01/24/2006 (4:27 pm)
For the can't access private variable mSoundThread error you need to make a friend.

class ShapeBase : public GameBase
{
   typedef GameBase Parent;
   friend class ShapeBaseConvex;
   friend class ShapeBaseImageData;
   // JAS:START:RTSKit code
   friend class RTSUnit;
   // JAS:END:RTSKit code

-Jerry
#8
04/28/2006 (12:32 pm)
Do the above instructions make RTS-SK work with 1.4? I don't want to go through a few hours work only to have it be for naught.
#9
03/15/2007 (3:03 pm)
If you want to make this work with TGE 1.5, you need to make all the adjustments above, plus some for the integrated Torque Lighting Kit.

First, at the top of RTSBuilding.cc, add:
#include "sceneGraph/sceneGraph.h"


In RTSBuilding.cc, void RTSBuildingMarker::renderObject(SceneState* state, SceneRenderImage* image), change:
installLights();
to
gClientSceneGraph->getLightManager()->sgSetupLights(this);

and change:
renderShadow(dist,fogAmount);
to:
renderShadow(state, image);

and then change:
uninstallLights();
to:
gClientSceneGraph->getLightManager()->sgResetLights();