Suggestions for (2D) simulation package

I’m not sure about JBox2D, but I tried it for Phys2D (having the Shape interface extend java.awt.Shape etc), and it’s not that much extra work. The transformation before drawing needs to be done anyway, and my drawing code is a lot more concise than the custom drawing code - for example, you can use Java’s AffineTransform to do the transformation, and then just call Graphics2D.draw(Shape) to do the drawing.

I think you don’t need to implement the 10 methods for each Shape type yourself, you can just extend the Java classes. That’s the way I did it for Phys2D and it works fine so far.

I agree that physics should be independent of graphics. But a body needs to have a shape for the physics anyway, so whether it’s a Shape coded from scratch or a Shape that extends Java’s Shape doesn’t make much of a difference IMO. Also I think this doesn’t introduce a dependence on Java2D, it just gives you the option to use Java2D if you’d like. You can still use Slick (that’s what I might do eventually) since all the stuff that you implemented originally is still there. It just extends Java2D now.