Comment by coffeecoders

Comment by coffeecoders 3 days ago

13 replies

Funny thing: this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring actually looks fake and too stiff. But if you let the animation wobble a bit more and slow down the damping, our brain reads it as weight and squishiness.

It’s basically controlled sloppiness.

dataflow 3 days ago

> this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring

Confused. Perfect physics means perfectly simulating reality, not perfectly simulating an unreal idealized formula. Are you saying Hooke's law doesn't feel realistic or are you saying a simulator for a realistic spring doesn't feel realistic?

  • luanmuniz 3 days ago

    In reality, nothing is perfect. Materials are never 100% one material. Rustness is imperfection, the weight and material of the ball, and the place it's attached are also consideration points, how firmly it is attached, and with which material. A "perfect" simulation of the spring itself would have to consider all these variables, and they almost never do.

    • zamadatix 3 days ago

      And even if you somehow included "everything" with the "perfect" equations, you'll end up with a lot of stuff which does not have a good closed form solution anyways and good luck getting that running (e.g. the dynamics around the air resistance/sound generation) via approximations both accurate enough that it looks better than "faking it" and fast enough that it's actually usable interactively.

      This leads to what GP was saying: many just cut things off at "Hooke's law simulates a spring, so I'll use that, but the rest is a bit too much to fit so I won't do it" but "Hooke's law simulates a spring but adding a bit of not-physics based fluff approximates all the rest" actually gives far superior results even though it doesn't only use perfect physics equations as the former did.

  • stavros 3 days ago

    I think they mean that "ideal" springs don't feel realistic (because they aren't).

skrebbel 3 days ago

Elasto Mania is a great game from decades ago (but still for sale!) that exploits this fact to a hilarious extent. You control a motor bike with excessively wobbly physics making all kinds of stunts possible (and necessary, to complete the levels) that are spectacular and surprising.

https://elastomania.com/

  • dom96 3 days ago

    I remember playing this game when I was like 12 years old, good times

  • ngcazz 3 days ago

    Also worth checking out, the FOSS clone X-Moto

  • apgwoz 3 days ago

    Wait. Is Jelly Car basically a rethinking of this? I never managed to have the elasto games, but looking at the trailer, there’s a lot of similarities.

  • finger 3 days ago

    I spent thousands of hours on that game.. just too good :)

marginalia_nu 3 days ago

Hooke's law is what's not not perfect physics, but an idealized version of a spring. No real spring (that we'd recognize as a spring) actually obeys it perfectly, because there is damping and friction and a bunch of things that Hooke's law does not factor in.

To get somewhat more realistic model of a spring, you a damping term, which turns it into an ODE[1].

[1] https://en.wikipedia.org/wiki/Mass-spring-damper_model

iamflimflam1 3 days ago

Same is true in a lot of old platformer games. Real physics feels horrible.

SAI_Peregrinus 3 days ago

Hooke's law only accounts for the force the spring applies, not the mass of the spring itself. Once you have to account for the mass of the spring, how that mass distribution changes as the string stretches & compresses, and how that alters the momentum it quickly loses its simplicity. That's far too difficult to do by hand, but it's what the real world does so I'd rather say that Hooke's law is a first-order approximation of spring force, not a perfect law for describing linear spring behavior.