Herding chickens and finding a duckling with sound alone

· 3 min read · game-design, game-dev, cozy-game, animals

Moving an animal from one place to another is one of those verbs that games get wrong in two ways. Either the animal is a piece of furniture that follows a line, or it is a physics problem the player has to fight for ten minutes.

Lantern Valley has two small quests built on this verb: five hens that ran out of the coop, and a duckling that got lost in the reeds. Both use the same piece of code, and they feel very different.

The hens: approach from behind #

Mrs. Wheat left the gate of the coop open, and the five hens are scattered across the farm, 15 to 27 meters from it. Each one is somewhere you can walk straight to the gate from, so no hen is trapped behind a fence.

The rule of the game is the same as the rule of real hens: they run away from whoever comes close, flapping their wings. So the move is to come in slowly from behind, and they run to the opposite side.

The design is in one detail: when a hen runs, its direction is leaned a little toward the gate. A small nudge, nothing a player would notice. It means that the hens never run toward you, and they never need to be touched. They just have to be walked, and the geometry takes care of the rest.

Three more details make it work without frustration:

  • a hen that hits a wall, a fence or a tree slides along it instead of getting stuck,
  • every hen that enters the pen makes a "bok" one note higher than the last, in the valley's five-note scale, with a little cloud of feathers and a chip with the count, 2 of 5, and the last one has a fanfare,
  • whoever goes in, stays: the hen now lives there, runs from one side to the other inside the pen, and is there again after you reload.

If you prefer the shortcut, the ration bucket also calls the hungry hens. That is the "cheat" that Mrs. Wheat "did not see".

The duckling: follow the peep #

The second quest has no character that gives it. On the Mirror Lake the mother duck has a "!" over her head. When you are about 24 meters from the lake, she cries out in worry and swims to the bank nearest to you. Talking to her starts the quest, and finding the duckling before talking to her also starts it. Nothing begins by itself.

There are six ducks on the lake: the mother, four ducklings in a line and a fifth one, lost in the reeds on the west side.

There is no arrow and no marker. The lost duckling peeps from time to time, a high "pi-pip" you can hear from far away, and it peeps faster the closer you are. The guide zone is large, and the rest is by ear.

When you are within about 3 meters, you have found it: a happy little peep, and it starts to follow behind you, one step away, at your speed. You cannot run too much: it falls behind and catches up when you stop. If you get more than about 26 meters away, it stops and waits, peeping, and follows again when you return.

Near the lake, the mother swims to the bank and calls. Within about 9 meters of her, the duckling runs to the water to meet her. Quack, peep, splash and hearts, and it joins the end of the line.

One piece, two feelings #

Both quests use the same small pieces: a pen that counts who entered and keeps them, a flock that decides the order, and the little "nudge" that bends an escape toward the goal. The duckling is a separate, tiny state machine: lost, found and following, at home.

What the two quests share is a rule I like: the player's input is never a command to the animal. It is a presence. The hens react to where you stand, the duckling reacts to how far you are, and the player's job is to be in the right place at the right time.

You can try it at lanternvalley.vercel.app.

Related projects