Jump to content
  • Advertisement
Sign in to follow this  
toXic1337

Programming Rope Physics

This topic is 4847 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

Hello Everyone! I've finally decided to break my WoW binge and get back into programming! One of the things I've been thinking about are ropes... Like a rope hanging from a stationary position. If I wanted to make this rope swing (realistically), each point on the rope (infinitely) would have a different equation of rotation to the origin (the fixed location/pivot). Soooo, I'm wondering what you guys personal experiences with creating ropes for swinging/etc have produced and maybe some tips to how you accomplished what you did. I'm sure I could loop through a defined set of closely positioned points and draw sprites at each point, then move each point a given distance/rotation based on its distance from the origin... that seem inefficient? Anyways, I'm stumped! All help appreciated, toXic1337

Share this post


Link to post
Share on other sites
Advertisement
Pendulum motion like what you describe is fairly well defined in Newtonian Physics. I'd just plot various point along the 'length' of the rope according to the equations, rendering a [small] circle there. Depending on how that looks, I might add extra 'weight' to each point in proportion to its closeness to the fixed attachment.

Sorry I can't be more help, but the actual math involved is 2nd-3rd semester calculus, and it's been a long time for me.

Share this post


Link to post
Share on other sites
I've implemented a nice rope system using Verlet integration. It was really simple and produced nice results.

Here is a really good article on Verlet. It's written with ragdolls in mind, but it works great for ropes as well.

If you need more info about how my system works, just let me know and I'll make a more detailed post.

Share this post


Link to post
Share on other sites
Aye!

I actually did think of doing this with some Calculus, was just avoiding it with fury.

Anyway, I'll get a subscription to Gamasutra and check out that article.

Thanks for the help guys! Also, if any of you have a way around using calculus please let me know, I'm 5 days from Calculus III, and I've sworn not to use the devil art again till it's needed [grin]

Thanks again guys!

toXic1337

Share this post


Link to post
Share on other sites
I second Jakobsen physics.

But definitely not the only method out there.

Have you played the old worms games? Did you notice how the rope system worked? It was rather impressive in my opinion. A rigid swinging rope could bend at the exact point of contact and transfer of energy was believable.

Now about Calculus, I would be suprised if you found yourself needing it at this point. Usually the math for real-time applications that I have come across is fairly simple. That said, a more traditional approach to the topic might involve using it.

Share this post


Link to post
Share on other sites
That's what inspired my interest in ropes at the moment!

I know there is an easy way... time to break out the PS1 and see the ropes in an annalytical sense.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!