Search found 143 matches

by zoom
Mon Nov 06, 2017 4:51 am
Forum: General Discussion
Topic: Bad Performance
Replies: 12
Views: 429

Re: Bad Performance

Allocation free methods are great and I think users of Dyn4J would benefit from them. One thing I learned form looking at other libraries that work hard to avoid allocations (like JOML, jMonkeyEngine et.c) is that on the one hand you want immutable value holders and on the other hand you want to avo...
by zoom
Sun Nov 05, 2017 7:47 am
Forum: General Discussion
Topic: Bad Performance
Replies: 12
Views: 429

Re: Bad Performance

I too would like to reproduce this and find the bottleneck, it would be really helpful if you could provide a test to illustrate this. Maybe it is a use-case that can be optimized in many ways but it is impossible to tell.
by zoom
Fri Oct 13, 2017 1:36 am
Forum: General Discussion
Topic: Collision detection bug/inaccuracy?
Replies: 9
Views: 346

Re: Collision detection bug/inaccuracy?

Seems like fixture created by Geometry.createRectangle behaves like Geometry.createCircle. https://github.com/wnbittle/dyn4j/blob/master/src/org/dyn4j/geometry/Geometry.java#L589 There must be something else going on. It would be really helpful if you could put together a junit-test or a simple app...
by zoom
Thu Oct 12, 2017 8:13 am
Forum: General Discussion
Topic: Collision detection bug/inaccuracy?
Replies: 9
Views: 346

Re: Collision detection bug/inaccuracy?

I don't understand the pictures. All I see is a number and some overlap. The larger the overlap the larger the number but where does that number come from?
by zoom
Tue Aug 15, 2017 4:03 am
Forum: Bugs, Enhancements, Feedback
Topic: Pathfinding and Steering
Replies: 3
Views: 779

Re: Pathfinding and Steering

It seems better to keep the physics separate from other concerns and not bolt everything into the dyn4j-jar. On the other hand it would be great if all the java libraries could converge on the same set of 2D/3D-primitives. It gets pretty tiresome to convert one vector2d to another librarys vector2d....
by zoom
Fri Aug 11, 2017 2:27 am
Forum: General Discussion
Topic: Test collision before adding new Body
Replies: 2
Views: 461

Re: Test collision before adding new Body

You can use the family of 'detect' methotds on the world.

http://docs.dyn4j.org/v3.2.4/org/dyn4j/ ... util.List-
by zoom
Tue Jul 11, 2017 11:44 am
Forum: General Discussion
Topic: Gravity Wells or Gravity Points without a Body
Replies: 4
Views: 505

Re: Gravity Wells or Gravity Points without a Body

the world gravity is just a 'global' force that is applied to everything. Think platformer games where you always fall down because gravity. To model planets and such you will have to calculate the effect of gravity yourself and apply it to the bodies between every step of the simulation. One way to...
by zoom
Thu Jun 08, 2017 5:10 am
Forum: General Discussion
Topic: CategoryFilters
Replies: 4
Views: 526

Re: CategoryFilters

assofohdz wrote:The masks you've picked, did you get those by checking out how the numbers are represented binary?

Edit: I guess they are the same as mine in a way, combined by the OR operator.


Yes, they should be similar, it's a bit mask.
by zoom
Wed Jun 07, 2017 11:04 am
Forum: General Discussion
Topic: CategoryFilters
Replies: 4
Views: 526

Re: CategoryFilters

I did something similar and it worked fine for me (although I never finished that game). public class CollisionGroups { /** * Static bodies collides with all bodies except other static bodies. */ public static final CategoryFilter STATIC_BODIES = new CategoryFilter(1, 14); /** * Dynamic bodies colli...
by zoom
Fri May 12, 2017 8:41 am
Forum: General Discussion
Topic: Physics in 3d games?
Replies: 2
Views: 561

Re: Physics in 3d games?

A 3D physics engine :-)

Something like PhysX, Bullet Physics, Torque 3D.

Go to advanced search