The Game Dev Atlas, Act I, The Pixel Art Island: an engraved map of an island whose towns are the techniques of pixel art for games.
Unrolling the map...
by Sprite Fusion

Motion · Act I

Pixel art loop. A devil, a zombie and a witch run, jump, land and stop dead, the same way five times. First the hat's tip flops, the tail trails and three flies chase the zombie's head. Then the same moves with those parts nailed in place, stiff. Then the hat, the tail and the flies are let go again, one after the other.
Act I, fig. 12 The hat's tip, the tail and the flies each ride on a spring toward their place on the body. Nobody animated them.

Devil's in the details! A hat, a tail or a pet that copies the body exactly moves like cardboard, and animating them by hand means frames for every move. Give each loose part a place on the body, and let it ride toward that place on a spring.

Make my character's hat, tail and pets each follow their place on the body with a damped spring.
Read the whole brief
Make the loose parts of my character move on springs. No new frames.
Parts: [the tip of a hat, a tail, three flies around the head].

- Each part has a target that rides on the body: a point over the head, behind the hip, a loop around the head.
- Each frame, for x and for y: v += ((target - pos) * k - v * c) * dt, then pos += v * dt.
- k is the spring, c the damper. As a frequency f = sqrt(k) / (2 * pi), as a damping ratio zeta = c / (2 * sqrt(k)).
- Start from f near 2 with zeta 0.4 for a floppy tip, zeta 0.6 for a tail, and f near 1.3 with zeta 0.3 for things that fly.
- Limit how far a part may get from its target. If it is ever very far, after a teleport, put it on the target at rest.
- Draw each part from its root on the body to where its spring has got to.
- For overshoot or a wind-up, use the three-dial form of second-order dynamics, which adds a response r.

Show me the same run, jump and dead stop with the springs off, then on.

Change what stands in [brackets] to fit your game.

  1. Anything loose with a place to come back to: the tip of a hat, a tail, ears, an antenna, a held lantern, a pet at the shoulder.

Not forToo-long capes, long hair and ropes. They need many linked points that pull on each other: use a cloth simulation, as in Pixel Cloth.

t3ssel8r presented the method in a video.[1] As reported in 2022, it has three parameters: frequency, damping and initial response.[2] In a public port a response over 1 overshoots.[3] The characters in the figure are skins of the game Destroy Any Website.

  1. t3ssel8r, Giving Personality to Procedural Animations using Math, YouTube
  2. Matthew Carlson, A Math Based Personality For Games, Hackaday, 2022
  3. Andicraft, A port of the update in C#, GitHub Gist