Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

glnefugio

The Physics behind Billiard

This topic is 5647 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Do you have an idea on how to calculate the velocity and the angle on wich to colliding balls leave after it? I would like to use this for a billiard game. Everything is nearly finished but that. I searched the internet but haven''t found something usefull. Any idea or formular? thanks

Share this post


Link to post
Share on other sites
Advertisement
I think you can use this sample to write Billiard physics. that helped me to do car ''physics''
http://www.d6.com/users/checker/dynamics.htm

Share this post


Link to post
Share on other sites
You could try posting this question in the physics section (at gamedev).

Basically - if you want the game to be at least somewhat realistic, you should probably give each of the balls some amount of potential energy as they''re hit with the cue or by other balls and subtract portions of it (now kinetic energy) as they in turn hit other balls or the sides of the pool table. Also - add surface friction to the table to bring the balls to a standstill once they run out of "energy". To find formulas on the above subjects, check out any highschool physics text book, or: simply type in some magic words in Google .

PS: if you want the balls to be able to do all kinds of weird stuff (such as bounce or fly off seemingly "randomly" as they hit the side of the table), you should consider implementing also other physical phenomena (such as gravity, elasticity, etc).

Note that this is only one possible way to approach the problem - the "realistic" way - just make sure you won''t stress out the cpu with too much physics - it''s not that hard to do...

Hope this helps,
Crispy

Share this post


Link to post
Share on other sites
quote:
Original post by stefu
I think you can use this sample to write Billiard physics. that helped me to do car ''physics''
http://www.d6.com/users/checker/dynamics.htm




are you doing a car game ?
I am about to do one. Could you give me your source code to look at ?

a_snisarenko@yahoo.com

Share this post


Link to post
Share on other sites
quote:
Original post by snisarenko
are you doing a car game ?
I am about to do one. Could you give me your source code to look at ?

a_snisarenko@yahoo.com


No, I can't give the full source atm. I can try to help here at gamedev if I can.

Have you tried my demo already?

Actually he car physics sucks (or there's lack of physics), but it's still quite fun driving. I'm just now making better transmission system, engine moment curve, etc.
What other sucks is the collision system. I'm testing every collision test even when car's are far from each other (that's why it might run very low fps). should be better in next demo, after some changes




RacingTREME - Linux ShipBattle


[edited by - stefu on December 4, 2002 7:01:56 AM]

Share this post


Link to post
Share on other sites
When the ball hits a wall then you can find the new direction by mirroring the direction vector on the line representing the normal to the wall. If your wall is parallel to the horizontal axis then you can mirror on the vertical axis (0,1), and so on. For collision with other balls, each point on the surface of the ball should have a normal, when your ball hits another ball, find the point of contact and mirror around the normal at that point.

------------
- outRider -

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!