ODEScript New Thread
by Gary "ChunkyKs" Briggs · in Torque Game Engine · 08/08/2006 (11:29 am) · 99 replies
Well, it's about a year on since I last was really posting stuff, so I thought I'd start a new thread.
From my .plan just now www.garagegames.com/blogs/20342/11050
Here's some code:
icculus.org/~chunky/stuff/odescript/oderocks-2006-08-08.tar.gz
icculus.org/~chunky/stuff/odescript/odescript-2006-08-08.tar.gz
ODEScript is the C++ code. ODERocks is a mod.
If you want the crossbow bolt thing to work, you'll need to edit projectile.cc and add StaticShapeObjectType to the Projectile::csmStaticCollisionMask at the top of the file.
In-game, hold down the C key to see the little physics UI. If you're on a real client instead of a listen server, the only UI widgets that will work properly are gravity [all directions], and the add rock/add link buttons.
Gary (-;
From my .plan just now www.garagegames.com/blogs/20342/11050
Here's some code:
icculus.org/~chunky/stuff/odescript/oderocks-2006-08-08.tar.gz
icculus.org/~chunky/stuff/odescript/odescript-2006-08-08.tar.gz
ODEScript is the C++ code. ODERocks is a mod.
If you want the crossbow bolt thing to work, you'll need to edit projectile.cc and add StaticShapeObjectType to the Projectile::csmStaticCollisionMask at the top of the file.
In-game, hold down the C key to see the little physics UI. If you're on a real client instead of a listen server, the only UI widgets that will work properly are gravity [all directions], and the add rock/add link buttons.
Gary (-;
#62
11/10/2006 (7:51 pm)
Hey guys, could i use ODEScript for a soccer ball?
#63
RigidShape may be a better bet for something that simple, though :-)
Gary (-;
11/10/2006 (9:19 pm)
Sure.RigidShape may be a better bet for something that simple, though :-)
Gary (-;
#64
And I just enter those commands into terminal one line at a time?
11/11/2006 (4:42 am)
The universal binary is static, right?And I just enter those commands into terminal one line at a time?
#65
And yes. The salient part of those commands are the enviroment variables [for universal purposes], and the configure command with --disable-dependency-tracking which removes some CXXFLAGS and CFLAGS from the build, that causes problems with multiarchitecture builds.
Gary (-;
11/11/2006 (10:53 pm)
Uh. Static. Don't remember. Don't have the build box on hand right now :-/And yes. The salient part of those commands are the enviroment variables [for universal purposes], and the configure command with --disable-dependency-tracking which removes some CXXFLAGS and CFLAGS from the build, that causes problems with multiarchitecture builds.
Gary (-;
#66
Any idea?
11/13/2006 (8:00 am)
Hey guys, i got this two erros compiling the last version using VS2005:..\engine\odescript\odeshape.cc(102) : error C2248: 'Convex::mObject' : cannot access protected member declared in class 'Convex'
../engine\collision/convex.h(161) : see declaration of 'Convex::mObject'
../engine\collision/convex.h(139) : see declaration of 'Convex'
..\engine\odescript\odeshape.cc(103) : error C2248: 'ShapeBaseConvex::pShapeBase' : cannot access protected member declared in class 'ShapeBaseConvex'
../engine\game/shapeBase.h(78) : see declaration of 'ShapeBaseConvex::pShapeBase'
../engine\game/shapeBase.h(70) : see declaration of 'ShapeBaseConvex'Any idea?
#67
It should be detailed in the README file in odescript.
Gary (-;
11/13/2006 (10:49 am)
Yep. You need to add friend class ODEShape to the ShapeBaseConvex class.It should be detailed in the README file in odescript.
Gary (-;
#68
11/13/2006 (11:14 am)
Thanks Gary, i didn't notice there's a readme file in the pack. =)
#69
Gary (-;
11/13/2006 (11:20 am)
Heh. Well, the README is fairly terse; outside of the friend class thing, it's mostly me whining about people not reading documentation :-)Gary (-;
#70
Linking...
odeshape.obj : error LNK2019: unresolved external symbol _dJointAttach referenced in function "public: virtual void __thiscall ODEShape::processTick(struct Move const *)" (?processTick@ODEShape@@UAEXPBUMove@@@Z)
tjoint.obj : error LNK2001: unresolved external symbol _dJointAttach
tjointconsole.obj : error LNK2001: unresolved external symbol _dJointAttach
odeshape.obj : error LNK2019: unresolved external symbol _dJointCreateContact referenced in function "public: virtual void __thiscall ODEShape::processTick(struct Move const *)" (?processTick@ODEShape@@UAEXPBUMove@@@Z)
tjointconsole.obj : error LNK2001: unresolved external symbol _dJointCreateContact
tbody.obj : error LNK2019: unresolved external symbol _dBodyCreate referenced in function "public: virtual bool __thiscall tdBody::onAdd(void)" (?onAdd@tdBody@@UAE_NXZ)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyCreate
tbody.obj : error LNK2019: unresolved external symbol _dBodyDestroy referenced in function "public: virtual void __thiscall tdBody::onRemove(void)" (?onRemove@tdBody@@UAEXXZ)
tbody.obj : error LNK2019: unresolved external symbol _dBodyAddTorque referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyAddTorque
tbody.obj : error LNK2019: unresolved external symbol _dBodyGetAngularVel referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyGetAngularVel
tbody.obj : error LNK2019: unresolved external symbol _dBodyAddForce referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyAddForce
tbody.obj : error LNK2019: unresolved external symbol _dBodyGetLinearVel referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyGetLinearVel
.
.
.
What's wrong? I'm sure 'im missing something.
11/13/2006 (12:36 pm)
Hey Gary, now it compiles fine, but i'm getting a lot of link errors. I've added all the ODE include directories and the lib directories such as ode.lib to the library files to add to the project, but still getting the same errors.Linking...
odeshape.obj : error LNK2019: unresolved external symbol _dJointAttach referenced in function "public: virtual void __thiscall ODEShape::processTick(struct Move const *)" (?processTick@ODEShape@@UAEXPBUMove@@@Z)
tjoint.obj : error LNK2001: unresolved external symbol _dJointAttach
tjointconsole.obj : error LNK2001: unresolved external symbol _dJointAttach
odeshape.obj : error LNK2019: unresolved external symbol _dJointCreateContact referenced in function "public: virtual void __thiscall ODEShape::processTick(struct Move const *)" (?processTick@ODEShape@@UAEXPBUMove@@@Z)
tjointconsole.obj : error LNK2001: unresolved external symbol _dJointCreateContact
tbody.obj : error LNK2019: unresolved external symbol _dBodyCreate referenced in function "public: virtual bool __thiscall tdBody::onAdd(void)" (?onAdd@tdBody@@UAE_NXZ)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyCreate
tbody.obj : error LNK2019: unresolved external symbol _dBodyDestroy referenced in function "public: virtual void __thiscall tdBody::onRemove(void)" (?onRemove@tdBody@@UAEXXZ)
tbody.obj : error LNK2019: unresolved external symbol _dBodyAddTorque referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyAddTorque
tbody.obj : error LNK2019: unresolved external symbol _dBodyGetAngularVel referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyGetAngularVel
tbody.obj : error LNK2019: unresolved external symbol _dBodyAddForce referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyAddForce
tbody.obj : error LNK2019: unresolved external symbol _dBodyGetLinearVel referenced in function "public: void __thiscall tdBody::damp(float)" (?damp@tdBody@@QAEXM@Z)
tbodyconsole.obj : error LNK2001: unresolved external symbol _dBodyGetLinearVel
.
.
.
What's wrong? I'm sure 'im missing something.
#71
And, uh, that's windows witchcraft, that I'm entirely unfamiliar with :-/
Gary (-;
11/13/2006 (1:20 pm)
Sounds like your ODE library isn't *actually* being linked. Try changing some linker settings so it really links with it?And, uh, that's windows witchcraft, that I'm entirely unfamiliar with :-/
Gary (-;
#72
At least i can play with the Debug =)
Thanks
Edit: What key should i press to see the GUI? Is the C key? If yes, i think it's not working.
11/14/2006 (11:59 am)
Hey gary, thanks for the help. I was able to compile the Debug version, but not the Release. I got some link errors in the Release build.At least i can play with the Debug =)
Thanks
Edit: What key should i press to see the GUI? Is the C key? If yes, i think it's not working.
#73
Gary (-;
11/14/2006 (12:38 pm)
To see the GUI, you'll need to actually have the oderocks mod running. You can either run the game with -mod oderocks, or you can add it alongside creator in your main.cs file.Gary (-;
#74
11/17/2006 (10:28 am)
Hey Gary, sorry for the newbie question but how can i use the oderocks mod? i tried to run with -mod oderocks but nothing happened.
#75
Gary (-;
11/17/2006 (11:23 am)
-mod oderocks shoudl be all you need. It's mostly a demo and testground of some of the stuff in ODEScript. Once you load it uop and have a mission running, try holding down the "C" button.Gary (-;
#76
where x is something, there are alot, not going to list them all, unless they are needed :)
-edit- Also I just looked, it cannot instantiate non conobject GuiTabBookCtrl, that's what it says after executing physicsopts.gui
11/27/2006 (3:52 pm)
Got it to compile on TSE MS4.1 :) Just one problem, I do canvas.pushDialog(physicsDlg); and it pops up with just he add rock/crate/link buttons, nothing below, none of those physics modification sliders. Console says "physicsui.cs (33 through to 52) unable to find object "GUIx" attempting to call function setValue"where x is something, there are alot, not going to list them all, unless they are needed :)
-edit- Also I just looked, it cannot instantiate non conobject GuiTabBookCtrl, that's what it says after executing physicsopts.gui
#77
11/27/2006 (4:19 pm)
Ok, I fixed it :) quite easy
#78
11/27/2006 (4:29 pm)
Sometimes my rock will hit the ground and get stuck half-way in it
#79
I've had some success tweaking the tolerance up and down, so that collisions are done a little further ahead of time, but mostly that's hakky and a bit of a pain. You may find it necessary to either [ur=http://tdn.garagegames.com/wiki/Physics/ODE#Collisions]re-write the collision code[/url], do a little more educated guessing in the topic of collisions [ODEShape waits until it's actually collided with something to create contacts], or come up with some way of detecting and fixing stuck objects.
Just by the way; ODEShape is mostly meant to be a really simple [ha!] shapebase-derived example of how you could use the rest of ODEScript. You could write your own object [deriving sceneobject or the like] and do all your own [smarter] collisions in that without having to modify any of the rest of odescript.
Gary (-;
11/28/2006 (10:30 am)
The rock getting stuck halfway into the ground thing; this happens at pretty high velocities? Mostly it's a limitation of the torque collision code.I've had some success tweaking the tolerance up and down, so that collisions are done a little further ahead of time, but mostly that's hakky and a bit of a pain. You may find it necessary to either [ur=http://tdn.garagegames.com/wiki/Physics/ODE#Collisions]re-write the collision code[/url], do a little more educated guessing in the topic of collisions [ODEShape waits until it's actually collided with something to create contacts], or come up with some way of detecting and fixing stuck objects.
Just by the way; ODEShape is mostly meant to be a really simple [ha!] shapebase-derived example of how you could use the rest of ODEScript. You could write your own object [deriving sceneobject or the like] and do all your own [smarter] collisions in that without having to modify any of the rest of odescript.
Gary (-;
#80
I fixed a widget issue, it works in 1.5, I have rotational interplation working [iffy, but turn-off-able]. That pretty much clears up the list of stuff I wanted done for a TGE official resource-like release
oderocks and odescript are now contained in one archive.
odescript-2006-12-02.tar.gz
Gary (-;
12/02/2006 (7:40 pm)
So, here's a new release of ODEScript. I'm finally leaning towards releasing a real resource, this should be considered RC. Lemme know if this works for y'all.I fixed a widget issue, it works in 1.5, I have rotational interplation working [iffy, but turn-off-able]. That pretty much clears up the list of stuff I wanted done for a TGE official resource-like release
oderocks and odescript are now contained in one archive.
odescript-2006-12-02.tar.gz
Gary (-;
Torque Owner Gary "ChunkyKs" Briggs
I know you were concerned about making universal binaries... well, there's how. That will install ode in a dir called "ode" in chunky's home dir. You'll want to change that bit :-)
Gary (-;