Advice wanted about collsion detection

Hi, i am creating a snooker game in java 2d at the moment, but i am not sure what collision detection strategy to use. Anyone got any ideas?

Stop crossposting >:(

Last time I checked snooker balls were round, so 2D circular bounds would be good.

It’s extremely easy to check the collision between two stationary circles.

If that’s not accurate enough, it’s quite easy to calculate the collision of one moving circle and one stationary. I hope you were awake on the linear algebra lessons.

If that is not accurate enough for you, you can come up with an equation that calculates the collision of two moving circles. Just find the solution for t in:


|(p1 + t*v1) - (p2 + t*v2)| = 2*r

where:

p1 = the position of ball 1
v1 = the velocity vector of ball 1
p2 = the position of ball 2
v2 = the velocity vector of ball 2
r = the ball radius