Billiards Suitability

Discuss new features and future development.

Billiards Suitability

Postby lynchem » Wed Jun 22, 2011 9:01 am

Hi,

I was evaluating using your engine for a billiards game (probably Pool initially) and was wondering what your thoughts on it were or if anyone here had tried anything similar.

The game would be in 3D but the balls would never leave the table so 2D should be enough. The most important thing in billiards other than the interaction between the balls and cushions (which I assume is no problem) is the ball spin and resulting movement after impacts. A cue ball hit with back spin for instance will slide across the table until contact with the object ball, at which moment it bites and causes the cueball to start moving in the direction of the spin (opposite to its intial direction).

Is it possible to simulate this with Chipmunk ?

Thanks in advance!
lynchem
 
Posts: 1
Joined: Wed Jun 22, 2011 8:50 am

Re: Billiards Suitability

Postby slembcke » Wed Jun 22, 2011 12:02 pm

Yes, it's possible. Chipmunk doesn't provide swept collisions, so you'll want to use a small timestep to ensure accurate collision normals. In order to simulate the interaction with the table, you'd have to create a control body and constraints like in the tank demo, but with some tweaks. I can explain this further if you are interested.

The biggest advantages of Chipmunk is that it provides fast collision detection, stable stacking and joints. You don't really need any of this and it sounds like you want to make a very realistic pool billiards game that includes the 3D rotation of the ball. The downsides of Chipmunk for this is that it doesn't simulate the rotation of the ball in 3D, and doesn't perform swept collisions. Swept sphere collisions are very simple to implement, and with only a few objects in the game you don't need efficient collision detection. You also only need simple elastic collisions. If you wanted to write the physics from scratch it really wouldn't be all that hard.

I'd probably use Chipmunk myself, but I'm biased. ;)
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest