Floor Is Lava: Developer Diary | Fixing the Watch-Ad Coin Bug, Version 100 (May 5, 2026)

Views: 4

Tuesday, May 5, 2026; approx. 4:30 p.m. to 12:10 a.m.


Floor Is Lava app icon
Get Floor Is Lava on Google Play

The Firebase piggy bank bug

A bug that only showed up once the game went online: locally, the piggy bank correctly held and returned your coins; through Firebase, it reset them to zero instead. With Claude already at 68% of its weekly usage on a Monday, I switched to DeepSeek to chase it down.

Removing the IIFE, from the gym step machine

I’d identified the real root cause behind a run of conflicts: the whole game loads inside a local IIFE wrapper (an isolated JavaScript scope), and Story Mode’s variables were walled off inside it. I wanted everything moved into the global space instead. Claude had previously advised against that; polluting the global scope is generally bad practice; but it was causing more problems than it solved. I set Claude the task of rebuilding without the wrapper and tested the result on my phone from the gym’s step climber, mid-workout.

The ad-blocker discovery

Tonight closed out three days of confusion around the “watch ad” coin transfer. The symptom was inconsistent in a telling way: on mobile it worked, on desktop the ad modal froze and coins vanished. The design flaw underneath it was worse than the bug; coins were moved into the piggy bank the moment the ad pop-up opened, so any failure zeroed them out entirely.

DeepSeek’s fix was a pending-transaction pattern: coins stay in the wallet while the ad plays and only move to the piggy bank once it’s confirmed watched, with a guaranteed fallback to the last known wallet value if anything glitches; nothing can zero out unless a transaction is fully confirmed. Claude implemented DeepSeek’s plan. It still failed silently on desktop, worked instantly on mobile once GitHub had processed the update; which strongly suggested (though I couldn’t fully explain it that night) an ad blocker or desktop-only script interference, rather than a logic bug in the game itself.

Version 100

By 12:10 a.m. the watch-ad patch held, I’d swept up the last couple of residual bugs, and called it: a stable version 100. Played through every episode to check the bad guy’s moves; including the sticky glue, which does exactly what it’s meant to: slows you enough that the lava can catch you if you’re too low.

🎮 Game Rules Log: May 5, 2026

  • Watch-ad coins are held as a pending transaction: only moved out of the wallet once the ad is confirmed watched, so a crash or refresh can never zero your coins
  • Cross-device settings sync confirmed working (master volume set on desktop carried over to mobile)
  • Sticky-glue platforms (from the bad guy) slow movement enough that you can die from the lava if caught too low

Photos from today

Floor Is Lava screenshot; 2026-05-05
Floor Is Lava screenshot; 2026-05-05

Read what happens next in the dev diary: the next entry.

Next Post
Wednesday, May 6, 2026; approx. 10:15 a.m. to 11:30 p.m.…