GithubHelp home page GithubHelp logo

phys2d's People

Watchers

 avatar

phys2d's Issues

AABox: touches() should check for greater OR EQUAL

A small thing at AABox:

public boolean touches(float x, float y, AABox other, float otherx, float
othery) {
  // ...
  return (totalWidth >= dx) && (totalHeight >= dy);
}


Original issue reported on code.google.com by DannyLade on 12 Jul 2009 at 12:13

Body collision feedback and control - registering a listener against the world to be notified of collisions and determine whether response should be computed.

Register a single listener with the world that is notified of collisions
and determines whether response should be applied. Note it must be a single
listener since we don't want to have more than one source of the response
decision - we could define a behaviour but it's simpler to restrict to one
listener and let the user decide how to combine response decisions.


Original issue reported on code.google.com by [email protected] on 5 Aug 2006 at 4:52

Static Body detection

If would be good to detect bodies that haven't moved for a while - we could
then record which other bodies they are touching and mark them as static
until they are either touched/untouched by a body or one of the bodies
connected becomes unstatic.

Complicated change - bares alot of thinking about.


Original issue reported on code.google.com by [email protected] on 5 Aug 2006 at 4:56

Frequent calling of method EdgePairs.toList() significantly reduce performance of entire engine.

What steps will reproduce the problem?
1. Start some demo with many polygons in it.
2. Open visualvm, and make cpu sampling.
3. EdgePairs.toList() - on the top 1 position using many CPU time.

What is the expected output? What do you see instead?
-

What version of the product are you using? On what operating system?
2008-04-06

Please provide any additional information below.
I looked in code. And found that it is not nesessary to convert EdgePairs to 
int[][]. Creation of int[][] is heavy operation. We can simply pass iterator of 
EdgePairs where it needed instead of int[][].  Here is code of iterator:

private class EdgeParisIterator implements Iterator<EdgePair>
      {
         private EdgePair current;

         @Override
         public boolean hasNext()
         {
            if (current != null)
            {
               return current.next != null;
            }

            return first != null;
         }

         @Override
         public EdgePair next()
         {
            current = current == null ? first : current.next;
            return current;
         }

         @Override
         public void remove()
         {
            throw new RuntimeException("Method not supported!");
         }
      }

Example of use in LinePolygonCollider:

Iterator<EdgeSweep.EdgePairs.EdgePair> collEdgeCands = 
sweep.getOverlappingEdges();

IntersectionGatherer intGath = new IntersectionGatherer(vertsA, vertsB);
while (collEdgeCands.hasNext())
{
    EdgeSweep.EdgePairs.EdgePair pair = collEdgeCands.next();
    intGath.intersect(pair.a, pair.b);
}

Patched code shows much greater performance.
code of all engine with my patch in attachment.

Original issue reported on code.google.com by [email protected] on 28 Jul 2012 at 8:56

Attachments:

Polygon Errors

I made my own custom physics file (Attached phys.java) and I edited the 
jar files (Attached .jar files[needs to be updated in editor]) and I made 
it so that I can drag and draw a shape,but when the shape starts falling 
it starts moving very weirdly,and most times falling thourgh the floor, 
email me at [email protected] if you want to see a video of exactly 
what my problem is.

Original issue reported on code.google.com by [email protected] on 25 Jul 2007 at 1:15

Attachments:

Performance/Memory

This issue should be used to track performance/memory improvements as they
are discovered.

Theres a bunch of garbage created for maths computations atm. This makes
the code easy to read but it might help tidy this up a bit.

Performance wise the important one seems to be reducing the complexity of
the Box/Box code. However, this is ported from the original demo so ways to
speed it up arn't immediately obvious.


Original issue reported on code.google.com by [email protected] on 5 Aug 2006 at 4:54

Refactor collision so it can easily be used seperately

It's possible to use the collision of shapes seperately to the rest of the
system. However, you can't use the spatial partitioning strategies outside
of the world currently. It'd be nicer if you could.

Suggested solution is to add a ShapeContainer which can be filled with
shapes (which internally get wrapped with bodies). It will duplicate some
of the work in World but would at least give two simple interfaces rather
than modifiying world and getting one ornate one.


Original issue reported on code.google.com by [email protected] on 5 Aug 2006 at 4:37

javadoc: Body.setMoovable()

javadoc: Body.setMoovable()

just few text mistakes

1.
Indicate whether this body should be able to moe.
*move


2.
"Parameters: moveable - True if this body is *rotatable*"
Shold be "moovable".

Original issue reported on code.google.com by [email protected] on 1 Jun 2007 at 9:15

Fix hardness/elastic collisions

Currently the hardness/elsatic collisions code works in 2 body collisions
but appears to add extra energy in larger scale collisions - see the Pool
ball demo.

Original issue reported on code.google.com by [email protected] on 5 Aug 2006 at 4:30

Feature Request - Oval Shape in Phys2D

I am creating a game in Java using Phys2D, and rather than using a circular
ball, I intend to use ellipses so I could "squeeze" the ball upon itself
and probably use joints to have pressure applied when squeezed.

I'm trying this out with line segments at the moment, but those aren't
working too well with colliding with other lines, most-likely to due how
line-segment collision at the edges works in Phy2D.  I'll probably use very
boxes instead for now.

It would be great if Phys2D either had line segment collision on the line
ends (not sure how this would be implemented) or an oval/oval-polygon shape
available.  I wouldn't mind a collision accuracy setting for these (even
though the math still isn't so hard with ovals) if it was faster to decide
the number of segments the object's made out of.


Thanks!,
Pritchard

Original issue reported on code.google.com by [email protected] on 31 Jan 2008 at 6:45

Integration of JScience

It is hard to understand what units are expected for several methods.
I think JScience (http://jscience.org/) is a great opportunity to solve
this problem. JScience will probably be added to Java 7.

I don't know if there will be any impacts concerning performance... 

Original issue reported on code.google.com by [email protected] on 15 Jul 2007 at 8:54

Setting rotation velocity is not included?

I noticed that phys2d does not have any option, what I can find, that can
set the rotational velocity.
Im using newest phys2d, downloaded a week ago, with vista.

I would really need a posibility to edit the rotation velocity, otherwise I
must set all my cars to none rotational.

Original issue reported on code.google.com by [email protected] on 4 Apr 2010 at 8:50

Collision detection failure with high velocities

Hello and thanks for a great library!  I'm using Pys2D to teach
programming.  My student and I are creating a "Pong" game where a ball
bounces between two paddles and off walls.  The problem is that when the
ball reaches higher velocities it can sometimes pass right through the
Lines we have as walls.  Attached is code to reproduce the problem.

With velocity of Vector2f(2300,1000) the ball will always stay inside.  If
you increase it to Vector2f(2400,1000) the ball will escape.

Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 4:17

Attachments:

Problem occurs when put heavier objects on much lighter ones.

What steps will reproduce the problem?
1. Put a heavy Box(say m=1000) upon a lighter one (say m=1)


What is the expected output? What do you see instead?
The heavy box should stay still.While in the simulation heavy box creeps
down , or fall through light one.

What version of the product are you using? On what operating system?
Latest , XP

Please provide any additional information below.
Probably in each step, after the accumulate impulse iterations is
completed. A shock prorogation sweep could be added to solve this problem.  

Original issue reported on code.google.com by [email protected] on 17 Oct 2007 at 9:02

Maven 2 project structure

What do you think about converting the project structure to Maven 2?
It is a big benefit especially for a library.

Original issue reported on code.google.com by [email protected] on 14 Jul 2007 at 4:51

Upgrade to Java 5

This is an enhancement, not a bug. I suggest upgrading Phys2d to use the
language features added in Java 1.5 including generics, enhanced for-loop,
and autoboxing.

Advantages: increased code readability and a more standard interface.

I've already made the necessary code changes and have attached a zip with
the updated project.  I also had all of the data classes implement
Serializable for possible synchonization of worlds across a network.

Cheers


Original issue reported on code.google.com by [email protected] on 19 Jun 2007 at 6:07

Attachments:

Box can't collide with line.

What steps will reproduce the problem?
1. We initialize a static circle.
2. We drop a line. Line is on the circle.
3. We drop a box and box will pass trough the line until it hits circle.

What is the expected output? What do you see instead?
The box should hit the line before hitting circle. 

What version of the product are you using? On what operating system?
I use 2007-05-06 version and window XP professional.

Please provide any additional information below.
 All of dropped objects are in same direction.

[ ]<-a box
 | <-a Line
 O <-a circle 
In my example, you type "L" for dropping a line.
You have to wait until the line hits circle.
Then, you type "b" for dropping a box.

Original issue reported on code.google.com by [email protected] on 19 May 2007 at 7:50

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.