Grab the rope below and throw it around. Then press 1 pass and watch it turn to elastic.
Where this rope comes from
At the Game Developers Conference in 2001, Thomas Jakobsen of IO Interactive presented "Advanced Character Physics", the physics behind Hitman: Codename 47. I have that from search summaries of the talk and its write-up; the copy of the paper I tried to read is blocked from the machine this was built on. The method is short enough to fit in a paragraph, which is a large part of why it spread.
Every point on the rope remembers where it was a moment ago, and moves on by the same amount again plus a little gravity. That is Verlet integration, the method the physics playground shows holding a moon's energy to a ten-billionth. Then comes the rope part. Each link measures itself, and if it is too long or too short it moves its two ends halfway back towards the right length. Do that for every link, a few times over, and draw.
Nothing in that rule says how stiff the rope is. There is no material, no spring constant, no strength. The rope is as stiff as the rule manages to make it before the frame is drawn, and the rule does not always manage.
The check: a real chain
A chain hanging between two pins takes a shape with an exact formula, the catenary. So the game rope has something to be held against. A 1.5 metre rope across a 1 metre gap should hang 50.3 centimetres below its pins, and the dashed curve in the toy is that formula, redrawn wherever you drag the pins.
Given enough passes, the game rope gets there. Run the rule four thousand times a step until nothing moves, and a 10-link rope hangs 0.70 percent below the true chain, a 20-link rope 0.21 percent, and a 40-link rope 0.09 percent. The gap is the chain being made of links rather than being smooth, and it closes as the links get shorter. The method is right, when it is allowed to finish.
Games do not let it finish. They take a fixed number of passes per frame and draw whatever they have.
The same 1.5 metre rope, stepped at 60 a second. Left: where it settles for four pass counts, over the true chain. Right: how far it stretches against its number of links. Drawn from the engine's own rope.
How far off it gets
At 60 steps a second with 40 links:
- 1 pass: the rope is 75 percent longer than it should be, and hangs more than twice as far down as a real chain.
- 4 passes: 20.8 percent.
- 16 passes: 5.5 percent.
- 64 passes: 1.3 percent.
The step matters too. Eight passes at 60 steps a second leaves the rope 10.8 percent long. The same eight passes at 240 steps a second leaves it 0.72 percent long, because gravity has less time to pull each point away between rounds of correction.
Adding detail makes it worse
This is the part I did not expect. A smoother rope needs more links, so the obvious way to make a rope look better is to give it more. At eight passes a step:
- 10 links: 0.5 percent stretch.
- 20 links: 2.6 percent.
- 40 links: 10.8 percent.
- 80 links: 40.4 percent.
The more detailed the rope, the more it behaves like a bungee cord. Each link corrects itself against neighbours that are being corrected at the same moment, and on a longer chain that tug of war takes longer to settle. That is the usual story for this kind of solver; I have not derived it here, and the measurement is the claim.
The numbers follow a tidy rule. Double the links and quadruple the passes, and the stretch hardly moves. The engine's tests check four such pairs, and each lands within 9 percent of the other: 20 links at 1 pass against 40 at 4, 40 at 4 against 80 at 16, and so on. The stretch goes roughly as links squared over passes. That is fitted from the measurements, not derived. It is also why a detailed rope is expensive: twice the smoothness costs four times the work just to stay as stiff.
Why it matters past games
This blog keeps finding the same thing: an answer that is well formed and false. The one-pass rope is a perfectly smooth, perfectly believable rope. It swings, it drapes, it collides. Nothing about it looks wrong until you put the real chain behind it, and then it is hanging more than a metre down where a real one hangs half a metre.
The bouncing ball in the playground does the same thing with time instead of space: a fixed step that cannot finish its job, and a picture that looks like settling. In both cases the fix is not a better picture. It is a number that says how far the picture is from the thing it is drawing, and that number is on the toy.
What is and is not modelled
The rope is points joined by links of fixed length, hung under standard gravity, with a small amount of damping so it comes to rest. The damping does not change where it settles: from 0.002 to 0.05 it leaves the settled stretch identical to four decimal places. There is no bending stiffness, no twisting, and no friction with anything. The catenary is exact for a perfectly flexible chain that cannot stretch, which is what the game rope is trying to be. The rope module and its tests live in our own engine, powered by rainshower, and the site's build check holds the numbers in this post to it.