Java-Gaming.org Hi !
 Featured games (91) games approved by the League of Dukes Games in Showcase (757) Games in Android Showcase (229) games submitted by our members Games in WIP (843) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
Pages: [1]
 ignore  |  Print
 Is ODE good enough for me?  (Read 1417 times) 0 Members and 1 Guest are viewing this topic.
CuppoJava

Junior Newbie

Java games rock!

 « Posted 2005-03-14 22:02:53 »

Hi,
I'm trying to create a 2D top-down shooter with realistic physics. I've tried my own 2d impulse physics engine for about half a year now, and I'm pretty much there, but there are quite a few of small problems that I can't solve, or find mention about on any paper.

I need my bodies to be constrained to only 2 dimensions. I want it to be fast too, so I don't want ODE to be doing extra work for 3D and then applying a 2D constraint.

The only extra feature I need, is to specify different directions for friction. ie. For a car, I want the sideways friction to be greater than the forward and backward friction.

Can ODE do all that I need? If so, I'm really looking forward to using it.

-Cuppo
weston
 « Reply #1 - Posted 2005-03-21 16:39:52 »

hmm, I wonder if someone as *any* information about this... I've been wondering about it for a long time and I saw another thread on the same topic a while ago with no replies.

CuppoJava please let us know if you have any plans for sharing your 2d physics engine, I know of at least one  programmer looking for someting similar...

for(int i = 1; i > 0; i++)
System.out.println(i+" cups of java downed");
darkprophet

Senior Devvie

 « Reply #2 - Posted 2005-03-21 18:22:11 »

Quote

so I don't want ODE to be doing extra work for 3D and then applying a 2D constraint

Well, ode is very fast for 2d and 3d. So really, there shouldn't be a problem with speed.  You will need to apply your own 2d constraints, but the calculations shouldn't be a problem. Again, profile and see...

Quote

The only extra feature I need, is to specify different directions for friction. ie. For a car, I want the sideways friction to be greater than the forward and backward friction

Yup, this can be done using contact parameters:

 1  2  3 `contact.setMode(Ode.dContactApprox_1 | Ode.dContactMu2);contact.setMu(100);contact.setMu2(500);`

Mu is a friction coeffecient which can also be used as the maximum force applied to the bodies as friction. Mu is in the direction of the contact, Mu2 is in sideways friction you speak about. And the normal is the normal of the two mu directions...

Well, using ode is far far better than rolling out your own..

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Pages: [1]
 ignore  |  Print

 EgonOlsen (42 views) 2018-06-10 19:43:48 EgonOlsen (22 views) 2018-06-10 19:43:44 EgonOlsen (43 views) 2018-06-10 19:43:20 DesertCoockie (197 views) 2018-05-13 18:23:11 nelsongames (124 views) 2018-04-24 18:15:36 nelsongames (123 views) 2018-04-24 18:14:32 ivj94 (863 views) 2018-03-24 14:47:39 ivj94 (124 views) 2018-03-24 14:46:31 ivj94 (768 views) 2018-03-24 14:43:53 Solater (140 views) 2018-03-17 05:04:08
 Java Gaming Resourcesby philfrei2017-12-05 19:38:37Java Gaming Resourcesby philfrei2017-12-05 19:37:39Java Gaming Resourcesby philfrei2017-12-05 19:36:10Java Gaming Resourcesby philfrei2017-12-05 19:33:10List of Learning Resourcesby elect2017-03-13 14:05:44List of Learning Resourcesby elect2017-03-13 14:04:45SF/X Librariesby philfrei2017-03-02 08:45:19SF/X Librariesby philfrei2017-03-02 08:44:05
 java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org