Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (564)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  ODEjava+Xith3D: how to begin  (Read 1656 times)
0 Members and 1 Guest are viewing this topic.
Offline vold_by

Junior Newbie




Java & Rock never dead


« Posted 2004-09-03 10:37:18 »

Hi William and All!
I'm rather strong in Xith3D and already have some commercial projects.
Then I want to add some phisics effects to some of my projects (walk, avatar object interacion etc.).
I did that:
1. Download odejava-0.1.1-full.zip (Is this latest? It is on the /old folder Smiley)
2. Download ODE API documentation from http://www.odejava.org/javadoc/
3. Closely read boxDemo and carDemo.

Unfortunately, this all are not useful to begin ODE integration with my projects, because of:
1. API documentation and examples have not explanation how I must init ODE world:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
world = new dWorld();
space = new dHashSpace(Ode.getPARENTSPACEID_ZERO());
contactGroup = new dJointGroup(0);
jointGroup = new dJointGroup(1);
world.setGravity(gravity.x, gravity.y, gravity.z);
// Setup callback function
Ode.setWorldID(world.id());
Ode.setContactGroupID(contactGroup.id());
Ode.setSurfaceMu(1f);
Ode.setSurfaceBounce(0.14f);
Ode.setSurfaceBounceVel(0.1f);
Ode.setSurfaceMode(Ode.dContactBounce | Ode.dContactApprox1);


Where I can read some little explanation about using ODE World, JointGroup, dHashSpace etc.?
Is tutorial anywhere?

2. In API documentation I see classes: World, Body. But in examples: dWorld, dBody. How I must understand this?

3. What difference between Body.addForce() and Boby.setForce() ?

And many more questions about many classes and method because of API documentation no explain how to use their.

Vladimir Al. Vernikovski
JProof Group
Offline t_larkworthy

Senior Member


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #1 - Posted 2004-09-03 18:16:59 »

Yeah. What you gotta remember about javaode is that its just a wrapper for ODE.
the documentation found in
www.ode.org
is essentail reading.
That will explain how to use the bodies.
Its then just a matter of working out what the wrapper class is. Its fairly obvious.
Things with a d prefix. are what the original names are of methods. And would be what you would use if you were writing C code.  Javaode exposes all these methods directly as is. Thats called the low level API and is in the class Ode as static methods.
As these arn't really very nice, the high level API is an abstraction of these method, in an attempt to OO the ODE API. Really you should not need to touch the low level API but sometimes if you need to do something obscure its helpful.
If I had to guess at the difference between set force and add force, I would say set force dictates the total force applied to a body for a time step. Add force which I use often just adds a force to be applied at a timestep. You average body may have lots of forces applied in different directions all at the same time.
Alot of these forces you won't be even creating. Things like collisions and stuff will be adding forces to a body to make it react convincingly. Don't use setForce.

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline vold_by

Junior Newbie




Java & Rock never dead


« Reply #2 - Posted 2004-09-04 06:38:12 »

Thanks for your answer! This is something useful...

Vladimir Al. Vernikovski
JProof Group
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2004-09-06 10:12:21 »

Make sure you get the latest natives here: https://odejava.dev.java.net/servlets/ProjectDocumentList?folderID=1810&expandFolder=1810&folderID=0

And grab the rest from CVS and compile (just call 'ant').

Please don't use the old version, there have been many non-backward compatible changes!

We should upload a more recent snapshot.

Will.

Offline JangGunheD

Innocent Bystander




Java games rock!


« Reply #4 - Posted 2004-09-06 16:45:21 »

And where do I get this "ANT"-Tool? I hope it's free?!?
Offline t_larkworthy

Senior Member


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #5 - Posted 2004-09-06 19:42:17 »

ANT? Uh oh, where have you been.
ANT is an apache tool. Its reads an XML build file. The build.xml and then compiles things and stuff for you.
Its much better than Make files becuase its corossplatfrom blah blah.
Yes its free.
Look for apache ant.
Pretty much everyone uses it nowdays.

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #6 - Posted 2004-09-06 21:21:41 »

http://ant.apache.org/

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #7 - Posted 2004-09-07 12:01:28 »

compiled (no need for ant) snapshot here:

https://odejava.dev.java.net/servlets/ProjectDocumentList?folderID=1843&expandFolder=1843&folderID=1843

grab natives from here:
https://odejava.dev.java.net/servlets/ProjectDocumentList?folderID=1810&expandFolder=1810&folderID=1843

to use with that snapshot.

Will.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Grunnt (20 views)
2014-09-23 14:38:19

radar3301 (14 views)
2014-09-21 23:33:17

BurntPizza (31 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (29 views)
2014-09-20 20:14:06

BurntPizza (33 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (75 views)
2014-09-10 13:57:51

TehJavaDev (108 views)
2014-09-10 06:39:09
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!