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 (-;
#82
Gary (-;
12/02/2006 (10:30 pm)
I had started that once, actually. I can carry on again soon, I just wanted to get this out the door :-)Gary (-;
#84
I'm just able to add the objects if i load firstly original TGE and lately ODERocks mod. Why that?
When i got the objects in the game, i can't shoot on them, just the player and the terrain can collide with. Another thing i noticed is that the objects movement are not smoothed. Is this normal?
Thanks in Advance
12/06/2006 (11:40 am)
Hi Gary, i think was better to post here too.I'm just able to add the objects if i load firstly original TGE and lately ODERocks mod. Why that?
When i got the objects in the game, i can't shoot on them, just the player and the terrain can collide with. Another thing i noticed is that the objects movement are not smoothed. Is this normal?
Thanks in Advance
#85
I don't really understand the question, sorry :-(.
I'm guessing that you mean to ask why ODERocks is just a mod? ODERocks is just a tiny little demo that utilises a bunch of objects from ODEScript. No reason to create a twenty meg game to do what works just as well as a 200k mod :-)
Ah, damn, I should add that to the documentation. Edit game/projectile.cc near the top, to add StaticShapeObjectType to the collision mask:
becomes
In the client menu in the physics UI, there are options for interpolation. Try changing those around a bit, see if they help.
Gary (-;
12/06/2006 (12:12 pm)
Quote:I'm just able to add the objects if i load firstly original TGE and lately ODERocks mod. Why that?
I don't really understand the question, sorry :-(.
I'm guessing that you mean to ask why ODERocks is just a mod? ODERocks is just a tiny little demo that utilises a bunch of objects from ODEScript. No reason to create a twenty meg game to do what works just as well as a 200k mod :-)
Quote: When i got the objects in the game, i can't shoot on them, just the player and the terrain can collide with.
Ah, damn, I should add that to the documentation. Edit game/projectile.cc near the top, to add StaticShapeObjectType to the collision mask:
const U32 Projectile::csmStaticCollisionMask = TerrainObjectType | InteriorObjectType | StaticObjectType;
becomes
const U32 Projectile::csmStaticCollisionMask = TerrainObjectType | InteriorObjectType | StaticShapeObjectType | StaticObjectType;
Quote:Another thing i noticed is that the objects movement are not smoothed. Is this normal?
In the client menu in the physics UI, there are options for interpolation. Try changing those around a bit, see if they help.
Gary (-;
#86
Sorry Gary, english is not my native language (you could realize that =p)
I mean that i was thinking that i only got Oderocks working if i load up starter.fps before load OdeRocks. So, i need to load the first mission in starter.fps and quit the game, then load ODERocks. However it is not true, there's no logic for that. I still sometimes getting it working, sometimes not... have no idea why this..
When i got the objects appearing i test if its colliding now.
Thanks
12/06/2006 (12:41 pm)
Quote:I don't really understand the question, sorry :-(.
I'm guessing that you mean to ask why ODERocks is just a mod? ODERocks is just a tiny little demo that utilises a bunch of objects from ODEScript. No reason to create a twenty meg game to do what works just as well as a 200k mod :-)
Sorry Gary, english is not my native language (you could realize that =p)
I mean that i was thinking that i only got Oderocks working if i load up starter.fps before load OdeRocks. So, i need to load the first mission in starter.fps and quit the game, then load ODERocks. However it is not true, there's no logic for that. I still sometimes getting it working, sometimes not... have no idea why this..
When i got the objects appearing i test if its colliding now.
Thanks
#87
No problem at all! Your grasp of english is better than a lot of native english speakers I could think of :-)
Running ODERocks; you should be able to just run the game with its default settings, then add "-mod oderocks" on the commandline.
For what it's worth, I personally modified my top level main.cs thus:
That way, it always runs oderocks. Whatever works for you would be fine :-)
Gary (-;
12/06/2006 (12:47 pm)
Quote:Sorry Gary, english is not my native language (you could realize that =p)
No problem at all! Your grasp of english is better than a lot of native english speakers I could think of :-)
Running ODERocks; you should be able to just run the game with its default settings, then add "-mod oderocks" on the commandline.
For what it's worth, I personally modified my top level main.cs thus:
$defaultGame = "starter.fps"; ..... $isDedicated = false; $modcount = 3; $userMods = "creator;oderocks;" @ $defaultGame;
That way, it always runs oderocks. Whatever works for you would be fine :-)
Gary (-;
#88
lol, thanks.
I tried this way and it worked! Now all the time i run TGE i got the objects working! Thanks again.
About the objects movement; I changed the options for interpolation and it makes a bit smoother, but far away like i beeing expecting. =( The obejcts looks like in 2fps.
12/06/2006 (12:58 pm)
Quote:No problem at all! Your grasp of english is better than a lot of native english speakers I could think of :-)
lol, thanks.
I tried this way and it worked! Now all the time i run TGE i got the objects working! Thanks again.
About the objects movement; I changed the options for interpolation and it makes a bit smoother, but far away like i beeing expecting. =( The obejcts looks like in 2fps.
#89
If you make it work better I would dearly love to know about it :-)
[check ODEShape::InterpolateTick(F32 delta)]
Gary (-;
12/06/2006 (1:00 pm)
Yeah, interpolation is something of a sticky topic, for various reasons.If you make it work better I would dearly love to know about it :-)
[check ODEShape::InterpolateTick(F32 delta)]
Gary (-;
#90
The only way to make it smoother is checking ODEShape::InterpolateTick(F32 delta) ?
About soccer ball physics; Using rigidShape i should code the ball physics for my own?
12/06/2006 (1:05 pm)
I just unchecked the angular interpolation and it makes the things a bit better.The only way to make it smoother is checking ODEShape::InterpolateTick(F32 delta) ?
About soccer ball physics; Using rigidShape i should code the ball physics for my own?
#91
12/06/2006 (1:12 pm)
Gary, I just want to do a JOINT to link the Car and the Trailer... This is possible in the ODE Script? (Using the vehicle script of TGE)
#92
Basically, if you want to make it smoother, then you'll need to check that function [it's in ODEShape.cc] and work out a better way of doing it than what's there. My way of doing it is a very simple velocity*time prediction, which isn't necessarily very accurate. Using RigidShape, most simple ball-type physics should be already working for you.
@Emerson: Sure, that could be done easily. If you already have a car model and you just wanna use ODEScript for joints, create a tdBody that reflects your car model [roughly; think "cube"], and one tdBody for your trailer [another cube] and link the two with a tdJoint.
Gary (-;
12/06/2006 (1:16 pm)
@Gustavo: the angular interpolation is kinda hard to do. Turning it off, most people would never notice anything.Basically, if you want to make it smoother, then you'll need to check that function [it's in ODEShape.cc] and work out a better way of doing it than what's there. My way of doing it is a very simple velocity*time prediction, which isn't necessarily very accurate. Using RigidShape, most simple ball-type physics should be already working for you.
@Emerson: Sure, that could be done easily. If you already have a car model and you just wanna use ODEScript for joints, create a tdBody that reflects your car model [roughly; think "cube"], and one tdBody for your trailer [another cube] and link the two with a tdJoint.
Gary (-;
#93
12/06/2006 (1:24 pm)
Thanks Gary, I'll Try!!!
#94
Firstly i'll merge that with my project and see how it looks, then i start to work on make it smoother. And in a last case, look into RigidShape.
Thanks for your help.
12/06/2006 (1:29 pm)
Hey Gary, so i'll try to make make it looks smoother =)Firstly i'll merge that with my project and see how it looks, then i start to work on make it smoother. And in a last case, look into RigidShape.
Thanks for your help.
#95
12/06/2006 (1:36 pm)
Thanks Gary, I'll Try!!!
#96
03/02/2007 (9:00 am)
So, the flicking objects were fixed?
#97
Anyone else run into this problem?
02/28/2008 (8:17 pm)
Any chance this is still being maintained? I've been trying to get this working, but I get one lousy linker error that I can't manage to fix:ode.lib(convex.obj) : error LNK2005: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in winMemory.obj
Anyone else run into this problem?
#98
@Nathan: uh, not sure. That's not a problem I ever saw. Does it work for you with ODE 0.8?
Gary (-;
02/29/2008 (9:44 am)
Uh, I haven't actually looked at ODEScript in a long time. Been using Ogre and Bullet for another personal project, and torque has been pretty much sidelined for me and the guys I work with.@Nathan: uh, not sure. That's not a problem I ever saw. Does it work for you with ODE 0.8?
Gary (-;
#99
Everything works except for the ragdoll part of ode...
ode error assertion "bNormalizationResult" failed in../../include\ode/odemath.h:326
The sphere and box works great.......Donnie
10/22/2009 (1:14 pm)
Damn....I keep getting this ode errorEverything works except for the ragdoll part of ode...
ode error assertion "bNormalizationResult" failed in../../include\ode/odemath.h:326
The sphere and box works great.......Donnie
Torque 3D Owner Ron Nelson