// TECH //

How offline earnings work with no server at all

The timestamp trick, and why it needs a ceiling

Close Cozy Fishing, come back the next morning, and the game tells you the crew kept fishing while you were gone and hands you a pile of money. Nothing was running. The tab was closed. There is no server anywhere in this game that could have been counting.

The whole thing is one subtraction.

One number, written down on the way out

Every time Cozy Fishing saves your progress, it also writes down what time it is. Not the time on a clock face, but a timestamp: a count of milliseconds since the start of 1970, which is the moment computers have agreed to count from.

The game stores that under the name lastSeen, in your browser's own storage, next to your upgrades and your best depth. It is written whenever something happens worth saving, and again the moment you switch away from the tab, so the recorded time really is the last time you were looking at it.

The sum on the way back in

When the game loads, it reads lastSeen, asks the browser what time it is now, and subtracts. That difference is the entire input. From it the game works out a payout, shows you a screen, and you tap to collect.

The rate comes from exactly one upgrade: Sonar. Nothing else feeds in. Your Line, your Hooks and your Reel change what happens while you are playing, and have no effect at all on time away.

Each Sonar level is worth more than the last, and the gap between levels widens as you climb. Every new level makes the one before it look small, which is the shape every idle upgrade wants.

Why there has to be a ceiling

Paying people for elapsed time has one obvious hole in it. The clock the game reads is the clock on your device, and you own that clock. You can change it. Wind it forward by a year and the subtraction dutifully reports a year of absence.

With no server there is no second opinion. Nothing else in the world knows what time it really is, so there is nothing to check against. Idle maths has to be written on the assumption that the number it is handed may be nonsense.

Cozy Fishing solves this the blunt way. Before doing anything else, it clamps the elapsed time to a maximum of eight hours. Away for nine hours, you are paid for eight. Away for a year, you are paid for eight. Whatever your Sonar level, there is one biggest payout that time away can ever produce, and no clock on Earth can talk it higher. A prestige bonus is multiplied on afterwards, when you collect, but the part driven by elapsed time is nailed down before the multiplier ever sees it.

The cap is not there to punish anyone for sleeping in. It exists because it turns an unbounded number into a bounded one, and a bounded number cannot break the economy no matter what it is fed.

Backwards clocks and tiny gaps

Two smaller guards sit next to the cap. If the elapsed time comes out negative, which is what happens when a clock has been wound backwards, the payout is zero. The check simply asks whether the gap is at least one minute, and a negative number fails that as cleanly as a five second one, so a scrambled timestamp falls through to nothing rather than producing something wild.

The one minute floor handles the other end. Refreshing the page, or bouncing out to check a message, should not trigger a reward screen. Under a minute away, the game says nothing.

Why this system has to exist at all

There is a detail in the main game loop that makes the whole thing necessary. Cozy Fishing measures how much time passed since the last frame, and refuses to believe any measurement above a fraction of a second. Most games do this, because it stops a game that was paused for two minutes from advancing two minutes of physics in one catastrophic step.

The side effect is that a backgrounded tab genuinely earns nothing. Frames stop arriving, and the few that do arrive cannot make up the difference. Active play and time away are two separate systems because the game refuses to let one pretend to be the other.

About Cozy Fishing