Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (499)
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  
  3D Physics / Collision Engine  (Read 2162 times)
0 Members and 1 Guest are viewing this topic.
Offline archdrone

Senior Newbie





« Posted 2012-08-22 22:55:26 »

I'm looking for a decent 3rd party library for collisions and physics. It looks like the 2 major options are JBullet and ode4j. I was wondering if anyone had experience with these libraries / suggestions. JBullet looks like it hasn't release since 2010 but ode4j is still in active development.
Offline gouessej

« In padded room »



TUER


« Reply #1 - Posted 2012-08-22 23:09:29 »

Hi

I advise you to use dyn4j. I thought it was just yet another physics engine but actually, it is actively developed and maintained, it uses a lot of JUnit tests, it is really good and it has a lower memory footprint than JInngine and JBullet. Best regards.

Offline archdrone

Senior Newbie





« Reply #2 - Posted 2012-08-22 23:20:45 »

dyn4j looks interesting, thanks for the post. But its a 2D engine and I need a 3D one
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline archdrone

Senior Newbie





« Reply #3 - Posted 2012-08-22 23:38:32 »

Also I'm wondering if anyone has actually released a game with a JBullet as a part of it. I can't much on the googles.
Offline TimB

Junior Member


Medals: 1
Projects: 1



« Reply #4 - Posted 2012-08-23 03:30:31 »

There has been some stuff done with bullet as part of JME3. I don't know the details but I know it's integrated into the engine and I think they are working on a new version of it.
Offline jezek2
« Reply #5 - Posted 2012-08-23 13:01:55 »

I'm looking for a decent 3rd party library for collisions and physics. It looks like the 2 major options are JBullet and ode4j. I was wondering if anyone had experience with these libraries / suggestions. JBullet looks like it hasn't release since 2010 but ode4j is still in active development.

ODE (the engine ode4j ports) isn't exactly updated either. Last release is from 2012, but according to changelog it provides just few bugfixes and the release before was from 2009. More importantly ODE is awful engine, I was very glad to leave it in 2007 when I discovered Bullet. With (J)Bullet you can use either high-level API, or when in need you can use any of the implementation classes yourself.

When doing real projects using real-time physics engine it's very often about doing many tricks, and access to implementation classes is very helpful. Also it contains continuous collision detection (EDIT: it seems ode4j got it too), not much well integrated with regular physics world, but you can invoke it manually for various needs. In my game I've used it for FPS player movement to provide sliding over walls and for detection of geometry so I can limit certain positions of player.

Also one thing to remember that even when physics engines provide collision detection it's not suitable for some tasks, like raytracing. It's way more efficient to write your own code for that, eg. using KD tree.

Yes JBullet could probably get some minor update, but the thing is that it works as is.

Also I'm wondering if anyone has actually released a game with a JBullet as a part of it. I can't much on the googles.

I've created JBullet to power my game: Resistance Force, but it will take some time to "release" that Wink Don't know of any "bigger" game (look at JME3 based games, some of them probably use JBullet), though people use it also for various non-gaming stuff.
Offline Phased
« Reply #6 - Posted 2012-08-23 13:04:06 »

not 100% but I think I watched a bit of a live stream of Notch's 0x10c stream, and if I'm remembering right, he put in JBullet (not 100% sure)
Offline archdrone

Senior Newbie





« Reply #7 - Posted 2012-08-23 19:39:48 »

Thanks Jezek2. And I am already using an OctTree but I was implementing the SAT test for OBB and was having too many issues. I can detect the collision, but figuring out the MTV was proving to be a giant pain the ass. I hoping your library can ease the pain so I can actually start working on the game and I'll need physics eventually anyways. Can I reuse my OctTree and tell the physics engine to only perform simulation on X group of objects?
Offline jezek2
« Reply #8 - Posted 2012-08-23 20:05:19 »

Thanks Jezek2. And I am already using an OctTree but I was implementing the SAT test for OBB and was having too many issues. I can detect the collision, but figuring out the MTV was proving to be a giant pain the ass. I hoping your library can ease the pain so I can actually start working on the game and I'll need physics eventually anyways. Can I reuse my OctTree and tell the physics engine to only perform simulation on X group of objects?

You can write custom Broadphase (needs a bit of innerworkings to know), but octree is not good structure for physics (and I suspect even in general case). JBullet has AxisSweep or DbvtBroadphase that are optimized on checking what objects are touching, the most useful property for physics engine (along with fast add/remove and position update).

In your case if you're already using it for different things I would just register the dynamic objects to JBullet, thus having them in both structures. In games that's pretty standard thing, to have different "databases" of things instead one, because different structures have different advantages, or it needs to be for different purposes (eg. spatial vs rendering order).
Offline gouessej

« In padded room »



TUER


« Reply #9 - Posted 2012-08-23 21:35:20 »

dyn4j looks interesting, thanks for the post. But its a 2D engine and I need a 3D one

No it works for 3D too despite its claim in the "about" page.

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.

xsi3rr4x (28 views)
2014-04-15 18:08:23

BurntPizza (25 views)
2014-04-15 03:46:01

UprightPath (40 views)
2014-04-14 17:39:50

UprightPath (22 views)
2014-04-14 17:35:47

Porlus (38 views)
2014-04-14 15:48:38

tom_mai78101 (62 views)
2014-04-10 04:04:31

BurntPizza (121 views)
2014-04-08 23:06:04

tom_mai78101 (221 views)
2014-04-05 13:34:39

trollwarrior1 (188 views)
2014-04-04 12:06:45

CJLetsGame (195 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!