The fog is the wolf's eyesight: Lullwood's fog tide

In Lullwood, the fog is the predators’ eyesight. Every 90 seconds a fog tide rolls in for 20 seconds, and a wolf, bear or lion standing in it sees up to 35% less far. A low drone starts 10 seconds before the fog arrives, so waiting for the tide is a choice, not a surprise.

We build Lullwood, a free browser horror game, in three.js and Next.js. This post is how the tide works, read from the source: the clock, where the fog sits on the map, whose position the sight cut is measured at, and what it costs you.

A 90-second clock with three phases

The tide is a pure function of one number. The engine keeps a counter, fogTideClock, that wraps at 90. In FOG_TIDE_CONFIG the period is 90, the active window is 20 and the lead-in is 10, so each loop splits into three phases by position: calm for the first 60 seconds, signpost from 60 to 70, active from 70 to 90. The signpost phase is the telegraph. Nothing about the world has changed yet except the sound.

The counter only advances while you are playing, so the pause menu freezes the tide with everything else. It is also not seeded. A fixed-period cycle keyed to the game clock is already identical run to run with no random draw at all, and a seed-derived offset would only have been a second seed source. On a fresh page load your first tide opens 70 seconds into play. The code never resets the counter between runs, so on a later run in the same tab it is already mid-cycle.

Three patches, not the whole map

The tide has a clock but also a location. FOG_TIDE_SITES lists three circular patches on the map, with radii of 130, 130 and 110 units. The tide’s strength at any point is the global ramp multiplied by a weight that is 1 at a patch’s centre and falls in a straight line to 0 at its edge. Outside every patch it is 0, whatever the clock says. The source comment gives the reason: the test for the feature was “can you walk out of the fog”, and that needs somewhere clear to walk to.

The timing is the same everywhere and only the extent is local, so every patch thickens on the same beat. The ramp is also eased, not snapped. The sight cut takes a four-second time constant to build, so the number below is what you get once the tide has settled, a few seconds into the active window.

The wolf’s position decides, not yours

Here is the detail that matters for play. When a predator checks whether it can see you, the engine multiplies its sight radius by fogTideDetectMul(fogTideAmountAt(p.x, p.z, ...)), and p is the predator. The tide is sampled where the hunter stands. At full strength, FOG_TIDE_DETECT_MUL is 0.65:

  • Wolf: sight radius 42 becomes 27.3
  • Bear: 30 becomes 19.5
  • Lion: 48 becomes 31.2

Those are the base radii at the centre of a patch, before the difficulty tier and the time-of-run curve are applied on top. Halfway out from the centre the weight is 0.5, so the cut is about 17.5% instead of 35%.

The fog you see is a different measurement. Scene fog density is sampled at your position, so you can stand in thick fog while a wolf outside the patch still sees you at full range. The reverse also happens: you can be in clear air with a hunter inside a patch, and it sees you short. What the screen shows is not a guarantee about what a predator sees.

The cut stacks multiplicatively with the mist veil. Holding the veil multiplies sight by 0.35, so a predator at a patch’s centre that is hunting a player who holds the veil sees at 0.35 × 0.65, about 0.23 of its normal radius. The comment in the source says that stacking is intended: the veil is a resource you spend and the tide is a free world event. How the veil works is in the survival guide.

Against you, it is a sight effect only. The scent and footstep checks do not read the tide, so the fog does not hide your trail. For scent, see how to survive wolves.

How the game tells you

There is no on-screen banner. We found no text in the HUD that names the tide while it is happening. The telegraph is audio and fog. During the signpost phase the drone gain rises to 2.6 times its normal level, and as the tide settles the wind gain drops to 30% of normal, so the ambient bed falls to a low drone. At full tide the scene fog density gets a further 0.1 on top of whatever is already set.

Two limits are worth knowing. The drone and the wind duck are blended by your distance from a patch, so you hear the signpost properly only near one. And they sit in the calm audio bed: while something is hunting you, the engine drops the calm bed entirely. The end-of-run recap can log the event in plain text, as “a fog tide rolled in” and “the fog tide passed.”

The cost: the child gets louder too

The same tide that cuts sight makes the child easier to find. At full tide, her glow intensity is multiplied by 1.5 and the range of her light by 1.35, both sampled at her position. The cry works the same way. The child’s cry is a hearing check with a radius of 32 units, and it is scaled by the same 1.35 at her position, so it reaches up to 43.2 units when she stands at a patch’s centre. A predator inside that radius rolls a chance each second to hear it and investigate.

So fog helps you cross unseen and it also carries her cry further. A hunter that cannot see you can still hear her. That trade is why waiting for the tide is a decision and not a free win.

What we took from other games, and what is a first cut

The source header cites one piece of genre research: Don’t Starve telegraphs its dangerous phase with a warning phase, dusk, before the state changes. The signpost phase is that idea. The scheduler that drives it is generic: a calm, signpost and active loop that other timed events can reuse.

The patch positions are described in the source as a first cut, with a tuning pass expected after playtesting. The cycle is also too slow to drive through end-to-end tests step by step, so the engine exposes a QA hook, qaSetFogTideClock, that sets the counter directly. It does not force the tide on, so the phase transitions still fire from the clock like they would in play.

If you want to use the tide rather than read about it, the practical side is in the Lullwood survival guide. Play Lullwood free in the browser and listen for the drone.