Quick answer: GameMaker HTML5 game save failing with quota exceeded errors? Browsers cap localStorage at ~5MB per origin — compact your save format or use IndexedDB for larger storage.
An RPG with deep inventory and quest state hits the 5MB cap after 30 hours of play. Saves start failing.
Compact JSON
Drop verbose property names. {"x":0} beats {"x_position":0} at scale. Use single-character keys for hot fields.
Binary Encoding
For numeric arrays, base64-encode a binary buffer. 4 bytes per int vs 6+ as JSON. Significant win for save data with lots of numbers.
IndexedDB via Extension
GM extension exposes IndexedDB to GML. Per-origin limit measured in hundreds of MB. Save large datasets there; small flags in localStorage.
Quota Detection
Catch the QuotaExceededError and surface to player. Suggest clearing old saves; prompt before silent data loss.
Verifying
Saves complete reliably even with large state. Failure modes surface to player with actionable messaging.
“localStorage caps at 5MB. Compact, encode binary, or move to IndexedDB.”
Profile save size during dev — a 1MB save at level 1 will hit 5MB by level 30 if it grows linearly.