Public Group

Programming Rope Physics

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

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 on other sites
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 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 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 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 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.

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 9
• 9
• 15
• 14
• Forum Statistics

• Total Topics
634070
• Total Posts
3015332
×

Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!