Happy wag

The happiest thing a dog can do: the tail goes fast, the ears flap, the head swings and the whole body bounces with each wag.

A cartoon dog with its tail swung to one side and its ears out, and a person beside it with a happy face, both lifted a little off the grass.

Use it in a cartoonOpen it in the block editorThe pack file (JSON)

What it is for

Happy wag is made for animals with tails, the dog and the cat, and for the monster, whose tail and antennae answer it. It says delight without a word: an owner coming home, a treat, a friend back from a trip. In the example cartoon Grump the dog finally does it when he admits he is "maybe a little" happy. On the person and the kid there is no tail to wag, so they keep the happy face, the head swing and the bounce. The bird's short tail wags too, though it is mostly hidden behind the round body.

The principle it shows: overlapping action

Four parts move at four speeds: the tail a full swing every 0.28 seconds, the ears every 0.7, the head every 1.4 and the bounce every 0.28. Because they overlap rather than move together, the character looks loose and alive, like a real animal whose parts each have their own weight. Line them all up at one speed and it would look like a wind-up toy.

The program, line by line

when it starts
  look happy
  swing tail 28° · every 0.28 s
  swing ears 10° · every 0.7 s
  swing head 5° · every 1.4 s
  bob 6 · every 0.56 s

Try this

  1. Make each wag take 0.6 seconds instead of 0.28. The tail now sweeps lazily, a contented wag rather than an excited one.

    In the program: swingPart · every 0.28 → 0.6

  2. Swing the tail 60 degrees instead of 28. The wag now fills the space behind the dog, the kind that knocks things off a table.

    In the program: swingPart · deg 28 → 60

How it differs from Whip tail and Floppy hop

Whip tail also swings the tail, but sends the swing down the tail one segment after another, so the tip whips and curls; Happy wag turns the whole tail at its base, a faster and simpler wag. Floppy hop is about hopping, with the ears and tail flopping after each landing.

Works on

Worked out by the build: it plays the move in the engine on each body and checks what moves on screen. Nobody types this table.
BodyMoves?What moves
2 legs (a person)yeswhole body, head
4 legs (a dog)yeswhole body, head, tail, ears
no legs (the monster with no legs)yeswhole body, tail, ears

c4c:beh:wag · version 1.0.0 · CC0 (public domain) · by Jabbertoon