Dear Community,
for a game idea I experimented with rope physics. This is my first prototype.
It is chain of infinitely stiff springs. Implementation is via verlet integration with iteration over the length constraints. I found the idea here: http://www.xtremevbtalk.com/showthread.php?t=224429.
First I wanted to implement a rope as in Worms2 and Fury of the Furries. But these seem to look unrealistic in the sense that you can push (!) yourself upwards with ropes (as if they are metal bars).
Control with arrow keys: Left/Right makes you swing, up/down changes rope length.
What do you think?
Edit: I added a new version, with slightly different physical implementation.
Edit2: Added Version 3.
New features: Collision with a circle, and the ropes fixed point can be moved with wasd.
[Prototype] Rope Physics
[Prototype] Rope Physics
- Attachments
-
- rope3.love
- Version 3
- (2.37 KiB) Downloaded 421 times
-
- rope2.love
- Version 2 of happy smiley on a rope.
- (2.13 KiB) Downloaded 204 times
-
- rope.love
- Happy smiley swinging on a rope
- (1.5 KiB) Downloaded 366 times
Last edited by micha on Tue Jan 22, 2013 6:19 pm, edited 2 times in total.
Check out my blog on gamedev
Re: [Prototype] Rope Physics
It's awesome !
PS : i've got some weird movement on my old computer (still get 300 fps but when I hit left, right, down or up, the rope goes crazy..)
PS : i've got some weird movement on my old computer (still get 300 fps but when I hit left, right, down or up, the rope goes crazy..)
http://darky-ben.fr/Xut my webcomic (french)
Re: [Prototype] Rope Physics
Dynamics are very dependent on 'dt' being provided resulting in system specific results.Darky wrote:It's awesome !
PS : i've got some weird movement on my old computer (still get 300 fps but when I hit left, right, down or up, the rope goes crazy..)
Just adding a print statement causes 'dt' to change and rope movement to go out of control on my computer.
Found setting 'dt' to 0.003 and damp to 0.999 gave more predictable results on my system.
Re: [Prototype] Rope Physics
Thanks. Thats valuable feedback.Ref wrote:Dynamics are very dependent on 'dt' being provided resulting in system specific results.Darky wrote:It's awesome !
PS : i've got some weird movement on my old computer (still get 300 fps but when I hit left, right, down or up, the rope goes crazy..)
Just adding a print statement causes 'dt' to change and rope movement to go out of control on my computer.
Found setting 'dt' to 0.003 and damp to 0.999 gave more predictable results on my system.
I figured, some parts of my code don't use dt properly. I will correct that.
Check out my blog on gamedev
Re: [Prototype] Rope Physics
This is very nice, micha, excellent work!
I did a quick test and didn't get any weird rope behaviour while swinging with the left and right keys.
The overall effect it is pretty cool, nice rope physics.
Keep it up!
I did a quick test and didn't get any weird rope behaviour while swinging with the left and right keys.
The overall effect it is pretty cool, nice rope physics.
Keep it up!
Re: [Prototype] Rope Physics
it's cute
Re: [Prototype] Rope Physics
Dear community,
I added a new file in the original post. I implemented the physics a bit different. They are supposed to represent real physics more closely.
Also the dt hopefully is not implemented consistently.
I also added a floor.
Do you still get unexpected rope behaviour?
I added a new file in the original post. I implemented the physics a bit different. They are supposed to represent real physics more closely.
Also the dt hopefully is not implemented consistently.
I also added a floor.
Do you still get unexpected rope behaviour?
Check out my blog on gamedev
Re: [Prototype] Rope Physics
The first time I opened it, I got no rope. Once I opened it again it was there though, it's as good as the first one here
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: [Prototype] Rope Physics
Ahhh! Someone else who knows that game. It's still one of my favorites of all time (although I first owned its licensed clone, Pac-in-Time.) My best wishes to you.micha wrote:Fury of the Furries
The rope2 sim appears to work well, although the smiley seems to have stronger swinging force the longer the rope is. Also, the rope gets quite coarse and jacob's-ladder-esque when it gets long - is it possible (or practical) to have a dynamic, semi-proportional number of segments?
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: [Prototype] Rope Physics
I agree with Clouds on the point that the rope should have more segments the longer it is.
Who is online
Users browsing this forum: Ahrefs [Bot] and 122 guests