Game Development Community

problems installing GMK MIT for T3D 3.0

by Kory Imaginism · in Game Mechanics Kit · 05/15/2013 (12:54 pm) · 17 replies

I didn't run into many issue in the past with GMK but not that it's gone MIT and with T3D 3.0 recent release. I've ran into a number of errors when trying to compile.
I have tried the method by deepscratch
www.youtube.com/watch?feature=player_embedded&v=OaKCfmwgK5o
and also the method by William
www.youtube.com/watch?v=v6BA_Llj_OE

I didn't have luck with either, if you have gotten it to compile in 3.0 please guide me in the right area. I'm sure others from the community would be able to benefit also.

Thanks in Advanced

KJ

#1
05/15/2013 (1:34 pm)
Kory,

I know there will be issues based on the directory rework stuff that Mike did for 3.0. The big one being the separation of the tools from the other gui systems.

I am looking at it and will pass on what I figure out as I go.

Ron
#2
05/15/2013 (1:38 pm)
Ok thanks Ron.
#3
05/15/2013 (5:33 pm)
Did some stuff but
havent been able to compile either

i would suggest splitting the physic part of gmk/ since this actually where u will sooner or later get problems
even if the rest shows no errors/warnings

and this might even be the way to get the gmk into T3D MIT
by removing the physic parts and keeping
the real backbone
such as the Cutscene Camera
and the Template System

anyways back to the topic i will see what i did
and share my findings (without physics)
#4
05/15/2013 (6:33 pm)
JOlinar
You're probably right about the physics. Yes, please if you do come across what ever you did please share. I would like physics but if that's were the errors are coming from then I'd rather have a build that compiles without errors than one with physics that's iffy and full of errors.

Thanks in advance
#6
06/02/2013 (5:23 pm)
I have started with a clean version of Torque 3.0. Used the Project Manager to generate a new project from the Full Template, and selected only Bullet for physics, the other options stay as default.

Once this is done, I opened up the solution in my visual studio, and I manually aded the LogicKingMechanics files into Torque 3.0. Firstly by creating a new filter under T3D called LogicKingMechanics, then creating a new filter under LogicKingMechanics called Physics, and then a new filter under Physics called Bullet. Once the filters have been added, I simply added all the code to the solution under the right filters.

After that, I used Win Merge to merge all the changes from the other source files in the GMK folder to Torque 3.0. I only merged changes marked //.logicking, and did not remove any changes that were added as part of Torque 3.0.

Once this has all been done, I commented out the SetThreadPosition Engine Method defined by LogicKing to avoid a runtime error later.

Next step is to add all the files from Engine\lib\bullet\src\BulletSoftBody\ into the Bullet project under a new filter called BulletSoftBody. This is required as it will eliminate compile errors.

After this, I didn't have any problems compiling. I also did a manual merge using Win-Merge of all the scripts changed by LogicKing and added all the art. I did not however modify any GUI scripts or GUI's I kept the stock ones from Full Template.

I copied the logickingmechanics tools into the tools folder as well. You can't use the demo level supplied by GMK as it has interiors that are not supported, so I started with Empty Room, and my intention is to add bits in from the demo level to experiment with.

I am however snookered by the Object Template List Gui as the templatesListTree is well and truly empty. I have traced all the code through to where it actually calls templatesListTree.insertItem
but I am unable to figure out why the templatesListTree is still empty even though in the log file it all looks fine.

Let me know if you still have any issues compiling this with torque 3.0. I am happy to help.
#7
06/02/2013 (6:23 pm)
ok thanks Gordon! I really appreciate it.
#8
06/03/2013 (3:31 pm)
Okay I found what was causing the issue, after a bit of pains taking debugging, turns out that part of the enhancements of Torque 3.0 include renaming of profiles in the profiles.ed.cs to include Tools in the name.
Since gui/profiles.cs in the LogicKingMechanics folder under tools has LogicMechanicsTreeProfile trying to inherit from GuiTreeViewProfile, I had to change it to inherit from ToolsGuiTreeViewProfile, and viola - templates now appear in the Object Templates List View.

I simply used this to drop a steel barrel into the empty room template, shot it and it exploded as expected.
#9
06/03/2013 (3:48 pm)
Great work, you also seem pretty good at programming maybe you could look in to one of the spots on the committee, of course if you have the time to commit.
#10
06/10/2013 (7:04 pm)
hey tahts great
@Gordin
really appreciate that spirit of sharing

gonna try it and see how it goes
#11
06/30/2013 (11:18 am)
first of all thanks to GG for making my dreams possible with t3d, thanks to mit for their licenses and all of the great stuff we now have the benefit of using for free, i'm a beginner programmer and cant get the GMK to work aswell i would like to try gordons solution but i dont get the option of selecting anything for physics i only get two templates to choose from "empty" an "Full" which is probably normal but the select bullet for physics nah i would love to play around with gmk i'm sure a lot of others would also maybe a more detailed explanation of gordins souloution would prove helpful help please anyone thanks
#12
07/20/2013 (6:36 pm)
I followed Gordons directions ... was not so bad, as most of the logicking changes were commented. Noticed that all references to interiors were removed, but otherwise didn't notice any conflicts.

Ran into compiler issues, missing some bullet stuff. Even after adding the soft body as described earlier.

So I, to get it to compile, I just rebuilt the libbullet project using all of the equiv files from under
T3D\Engine\lib\bullet\src

Now, onto merging the assets and scripts... and testing ...

Thanks GW!
#13
09/26/2013 (1:33 pm)
Please! Can anyone share a fully merged T3D MIT 3.0 and Game Mechanics Kit + Guide Bot 1.2.13 project to save us time...
#14
09/26/2013 (6:18 pm)
" T3D MIT 3.0 and Game Mechanics Kit + Guide Bot 1.2.13"

with some effort u can merge GMK with t3d 3.0

but there r some issues due to bullet engine.
cannot remember clearly.
but there were.

for guide bot u can merge it with t3d mit.
but it has lost some of it's functionality long ago due to changes made in t3d's stock physics engine.
needs lots of understanding and time.
not worthy for others then it's developer.
as far i can remember deepscratch also tried to do it.
never heard any success from his side.

"Can anyone share a fully merged"
cannot.guide bot never was published for public.
#15
10/21/2013 (8:20 pm)
If anyone is trying to use this with the latest development branch of torque3d (with bullet 2.81) here is a small fix:

File: Engine/source/T3D/logickingMechanics/physics/bullet/PhysicsBullet.h

Replace the function:
static bool contactAddedCallback(blah, blah);

With:
static bool contactAddedCallback(btManifoldPoint& cp,
		const btCollisionObjectWrapper * colObj0,
		int partId0,
		int index0,
		const btCollisionObjectWrapper * colObj1,
		int partId1,
		int index1);

File: Engine/source/T3D/logickingMechanics/physics/bullet/PhysicsBullet.cpp

Replace the function:
bool PhysicsBullet::contactAddedCallback(blah,blah)
{
}

With:
bool PhysicsBullet::contactAddedCallback(btManifoldPoint& cp,
	const btCollisionObjectWrapper * colObj0,
	int partId0,
	int index0,
	const btCollisionObjectWrapper * colObj1,
	int partId1,
	int index1)
{
	if(cp.getLifeTime() == 0)
	{
		btVector3 vel = colObj0->getCollisionObject()->getInterpolationLinearVelocity() - colObj1->getCollisionObject()->getInterpolationLinearVelocity();
		//filter slow contacts even before calls to owner objects
		if(vel.length2() > Physics::minVelCallbackThreshold * 
			Physics::minVelCallbackThreshold)
		{
			PhysBody* owner0 = dynamic_cast<PhysBody*>( PhysicsUserData::getObject(colObj0->getCollisionObject()->getUserPointer()));
			PhysBody* owner1 = dynamic_cast<PhysBody*>( PhysicsUserData::getObject(colObj1->getCollisionObject()->getUserPointer()));
			if(owner0)
				owner0->onContact(vectorFromBt(cp.getPositionWorldOnA()), vectorFromBt(vel), vectorFromBt(-cp.m_normalWorldOnB));
			if(owner1)
				owner1->onContact(vectorFromBt(cp.getPositionWorldOnB()), vectorFromBt(-vel), vectorFromBt(cp.m_normalWorldOnB));
		}
	}
	return false;
}

Slight API change in bullet with them now using btCollisionObjectWrapper
#16
10/24/2013 (6:50 pm)
Just wondering if it's possible to just pull out GMK's cutscene editor and add that to T3D without the rest of GMK or is it dependent on the rest of the GMK code?
#17
10/25/2013 (3:35 pm)
actually it would be possible as it is not so much dependent
and with some reworking it could be seperated from GMK itself

when you look close at the src files of GMK
you will see that there is actually not that much that is tied to the
cutscene editor, i believe if i remember right that the ties are just in shapebase.cpp/ .h

However a seperation would mean - one would have to create
a new gui to handle the cutscene editor
and that is a bit tricky

anyways am a bit busy with my own project
but i might be able to lend a hand/ maybe i will even seperate the cutscene editor, will see
but if there are others who who want to give this a shot, go ahead
#18
11/05/2013 (2:01 pm)
well i tried it but it is far more complicated then i expected
the cutscene editor is bound to the template system of gmk