Ball - projectile, or object?
by Josiah Wang · in General Discussion · 12/15/2004 (10:59 am) · 18 replies
I'll use Tennis Critters as an example - was the ball a projectile, or was it an entirely different object (ie uses a separate datablock)?
I was thinking maybe it was a projectile that bounced back against the racket (which might've been an object mounted onto the squirrels), but then i realized that the ball would bounce off the squirrel even if they didn't swing...
I was thinking maybe it was a projectile that bounced back against the racket (which might've been an object mounted onto the squirrels), but then i realized that the ball would bounce off the squirrel even if they didn't swing...
#2
04/03/2007 (5:34 am)
*bump* I want to make a ball-like rigid body moving around by the gravity, external forces etc. Can some one point out a simple example?
#3
04/03/2007 (5:56 am)
Do a search for ball physics maybe?
#4
04/03/2007 (7:37 am)
I think rigidshape, which is included in TGE 1.5 is good enough. But if you want more complicated one, you can choose Ode.
#5
ODE is very powerful, but might be overkill for something as minor as a bouncing ball. It involves quite a bit of work to implement, and might not be suitable if your project cannot use Open Source resources.
If all you're doing is bouncing a ball around, you might consider building your own physics for it.
04/03/2007 (9:04 am)
Rigid body physics are a little rough, in my opinion. The objects I've tried to implement tend to stutter and roll backwards like a billiard ball with too much "English" on it, no matter how much I fiddle with the datablocks. I suspect that trying to make a realistic ball game with this would yield unsatisfactory results. I'd be interested in hearing from other folks who use it.ODE is very powerful, but might be overkill for something as minor as a bouncing ball. It involves quite a bit of work to implement, and might not be suitable if your project cannot use Open Source resources.
If all you're doing is bouncing a ball around, you might consider building your own physics for it.
#6
04/03/2007 (9:11 am)
ODE is not actually too hard to implement using the resource. I got it working the other day with the help of the guy who wrote the resource. I'm gonna post how I got it working probably tonite if I can remember to do it. Again though it may be more than you need for your game.
#7
Thanks in advance.
04/03/2007 (9:21 am)
Could you possibly create a few mini tutorials and put them up on TDN (or public)? I'm interested in ODE, I have a physics book (can't recall the title at the moment), and it uses ODE, but with lame examples.Thanks in advance.
#8
And here's the resource. ODEScript Physics
04/03/2007 (9:58 am)
Heres the TDN link by the author of ODE Script. ODE, Physics, and Creamy Torque GoodnessAnd here's the resource. ODEScript Physics
#9
Thanks again.
04/03/2007 (10:05 am)
I did check that out before. But it didn't help me much... perhaps when you post how to hook up ODE with TGE (and TGB?) then I'll give it another try. Perhaps it's just my lack of understanding how the math correlates with with the game environment/objects. :(Thanks again.
#10
04/03/2007 (10:30 am)
If your using vs2005 express I can step you through setting it up.
#11
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5495
thanks for replies!
04/04/2007 (4:32 am)
I think I have found what I was looking for:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5495
thanks for replies!
#12
@mb - yep, I have vs2005 express. Could you post instructions as a resource so all GGers can share the resource? If not, you can email me a doc to ajherrera71<'at'>yahoo<'dot'>com.
Thanks.
04/04/2007 (6:26 am)
According to that link, it looks like TGE 1.5 has it incorporated now. Neat.@mb - yep, I have vs2005 express. Could you post instructions as a resource so all GGers can share the resource? If not, you can email me a doc to ajherrera71<'at'>yahoo<'dot'>com.
Thanks.
#13
If you have 1.5 you dont need to do that resource like A Herrera said its already incorperated into 1.5.
@Herrera
I sat down last night after work and typed out a detailed tutorial on how to get ODE working. When I was finished, after about 45 minutes or so, I clicked 'modify' on my post and it errored out. I was unable to go back to my post and lost everything I had typed. :( I'll try to do it again later and email you. I posted a short version on the resource page (my last post on there). Next time I'll make it in notepad first and save it.
04/04/2007 (6:46 am)
@Middle East Technical Uni. (#000 If you have 1.5 you dont need to do that resource like A Herrera said its already incorperated into 1.5.
@Herrera
I sat down last night after work and typed out a detailed tutorial on how to get ODE working. When I was finished, after about 45 minutes or so, I clicked 'modify' on my post and it errored out. I was unable to go back to my post and lost everything I had typed. :( I'll try to do it again later and email you. I posted a short version on the resource page (my last post on there). Next time I'll make it in notepad first and save it.
#14
Yes, I got that I don't have to make any chnages in the engine, nice. I was looking for the script to create a simple rigid shape, which was like this:
04/04/2007 (8:20 am)
@mb & HerreraYes, I got that I don't have to make any chnages in the engine, nice. I was looking for the script to create a simple rigid shape, which was like this:
datablock RigidShapeData( BouncingBoulder )
{
category = "RigidShape";
shapeFile = "~/data/shapes/boulder/boulder.dts";
emap = true;
// Rigid Body
mass = 500;
massCenter = "0 0 0"; // Center of mass for rigid body
massBox = "0 0 0"; // Size of box used for moment of inertia,
// if zero it defaults to object bounding box
drag = 0.2; // Drag coefficient
bodyFriction = 0.2;
bodyRestitution = 0.1;
minImpactSpeed = 5; // Impacts over this invoke the script callback
softImpactSpeed = 5; // Play SoftImpact Sound
hardImpactSpeed = 15; // Play HardImpact Sound
integration = 4; // Physics integration: TickSec/Rate
collisionTol = 0.1; // Collision distance tolerance
contactTol = 0.1; // Contact velocity tolerance
minRollSpeed = 10;
maxDrag = 0.5;
minDrag = 0.01;
triggerDustHeight = 1;
dustHeight = 10;
dragForce = 0.05;
vertFactor = 0.05;
normalForce = 0.05;
restorativeForce = 0.05;
rollForce = 0.05;
pitchForce = 0.05;
};
#15
The main reason I want to work with ODE is to see if I do a remake of the classic one on one basketball game. The only problem I am having currently is trying to figure out the projectile motion in 2D to make it look like 3D, and from what I have read in the physics book I bought - is that ODE can help me with this. Have you done anything like that? A projectile motion going "into" the screen as if the basket was really away from the player? I would have to come up with the arc and velocity, as well as a shadow motion to make it appear that it's floating in the air with gravity pulling the ball downward.
Thanks again.
04/04/2007 (9:10 pm)
@mb - no problem. Any tips/solutions you can provide are greatly appreciated. I can wait :DThe main reason I want to work with ODE is to see if I do a remake of the classic one on one basketball game. The only problem I am having currently is trying to figure out the projectile motion in 2D to make it look like 3D, and from what I have read in the physics book I bought - is that ODE can help me with this. Have you done anything like that? A projectile motion going "into" the screen as if the basket was really away from the player? I would have to come up with the arc and velocity, as well as a shadow motion to make it appear that it's floating in the air with gravity pulling the ball downward.
Thanks again.
#16
and why are links not working anymore?
04/05/2007 (4:56 pm)
I made a tutorial for garys odescript: [url=www.justsnowboarding.com/hs/users/1/ODEScript Tutorial.rtf]Download Here[/url]and why are links not working anymore?
#17
04/05/2007 (5:30 pm)
@mb - Thanks again. I'll dedicate this weekend to getting it to work.
#18
04/05/2007 (11:41 pm)
Looks like the link has to end in an HTML file; it doesn't seem to recognize .RTF as a valid URL destination.
Torque Owner Charlie Malbaurn