Quick answer: Construct 3 LocalStorage save failing silently after enough plays? Browsers cap localStorage at ~5MB - compress save state with JSON.stringify + LZ-string or migrate to IndexedDB.

Roguelike save grew to 6MB over 30 hours of play. New saves silently fail; the player's progress isn't being persisted.

Compress before storing

JSON.stringify then run through lz-string. 3-5x compression on typical save data. 6MB drops to ~1.5MB; well within quota.

Migrate to IndexedDB

For large saves, IndexedDB has a per-origin quota in the hundreds of MB. Construct 3 plugin exists; refactor the save layer once.

Detect quota errors

Wrap LocalStorage writes in try/catch on QuotaExceededError. Show the player a 'save failed' notification instead of silently dropping data.

“LocalStorage is small. Treat it like a settings cache, not a database.”

Display the save size somewhere in dev settings. The player can't see it; the developer needs to.