Collisions without using Rectangles

i searched in google for collisions in Java games without using Rectangles, because i don’t know if using Rectangles for collisions is the best(if it doesn’t affect the game performance, like a little lag in the objects before doing the collision) and i know there is a way to make collisions checking the x, y, width and height of the objects which will collide.

That’s exactly what Rectangle.intersects(Rectangle r) does. No need to re-invent the wheel.

Where did you hear that? If you’re using Java2D rectangle collision will be the least of your lag-related problems.

oh, thanks for the answer.

You could instead check the distance between objects, and give each object a radius.