Thanks for the answers!
In general, there's no point in using swing if you use your own buffer strategy.
I'm sorry if that's a dumb question, but where did I use swing? Do you mean defining it as extending JFrame? What should I use instead?
In drawPolygonBody you seem to be creating new polygons on each frame. Is that necessary? Did you check the rate of garbage being generated (-verbose:gc or use VisualVM/VisualGC)?
OK, I'll wrap the bodies in a class that also saves the polygons created upon instantiation.
graphics.drawLine((int) v1.x, (int) v1.y, (int) v2.x, (int) v2.y);
graphics.drawLine((int) v2.x, (int) v2.y, (int) v3.x, (int) v3.y);
graphics.drawLine((int) v3.x, (int) v3.y, (int) v4.x, (int) v4.y);
graphics.drawLine((int) v4.x, (int) v4.y, (int) v1.x, (int) v1.y);
So you transform the points yourself and then draw the rectangle? Have you tried just setting a transform and doing a drawRect? With latest java versions that should be much faster.
I actually did but I ran into some problems & just reverted back to doing it this way. I'll check it out again.
Thanks again Dimitri.