godot-platform-web
Installation
SKILL.md
Platform: Web
Browser API integration, LocalStorage persistence, and size optimization define web deployment.
NEVER Do (Expert Web Rules)
Persistence & Storage
- NEVER use FileAccess for persistent saves — Browsers sandbox the filesystem. Standard
FileAccesstouser://is unreliable. Always useJavaScriptBridgeforlocalStorageorIndexedDB. - NEVER assume localStorage is permanent — Browsers may purge local storage if space is low. Always implement a cloud-save fallback for production titles.
Rendering & Logic
- NEVER use the Forward+ renderer — Forward+ requires Vulkan features that are unstable in browsers. Use the Compatibility (WebGL 2.0) renderer for consistent 60 FPS.
- NEVER block the browser event loop — Long-running sync logic will cause the browser to prompt the user to "Kill the Page." Use
awaitand background tasks. - NEVER ignore the COOP/COEP header requirement — Multi-threading and
SharedArrayBufferwill fail on many hosts unless cross-origin isolation is configured server-side.
UX & Security
- NEVER forget to handle tab focus loss — Audio playing in a hidden background tab is poor UX. Use
visibilitychangeto pause audio. - NEVER trigger Fullscreen/Mouse Lock without click — Browsers block security-sensitive requests unless they are inside a direct user interaction event.
- NEVER use absolute paths in HTML shells — Use relative paths to ensure the game works when hosted in sub-directories.