platform-mobile
Installation
SKILL.md
Platform: Mobile
Touch-first input, safe area handling, and battery optimization define mobile development.
Available Scripts
mobile_safe_area_handler.gd
Expert safe area handling for notched screens using anchored margins.
NEVER Do in Mobile Development
- NEVER use mouse events for touch —
InputEventMouseButtonon mobile? Unreliable. UseInputEventScreenTouch+InputEventScreenDragfor touch. - NEVER ignore safe areas — UI behind iPhone notch = unusable. Call
DisplayServer.get_display_safe_area(), offset UI by top/bottom insets. - NEVER keep 60 FPS when backgrounded — App in background @ 60 FPS = battery drain + store rejection. Set
Engine.max_fps = 0onNOTIFICATION_APPLICATION_FOCUS_OUT. - NEVER use desktop UI sizes — 12pt font on phone = unreadable. Minimum 16-18pt for mobile. Use
get_viewport().sizeto scale dynamically. - NEVER forget VRAM compression — Uncompressed textures on mobile = out of memory crash. Enable
rendering/textures/vram_compression/import_etc2_astc=truein project.godot. - NEVER block main thread for saves — Saving large file on touch = freeze = ANR (Application Not Responding). Use
FileAccesson worker thread. - NEVER ignore orientation changes — Game locked to portrait but device rotates? Jarring. Handle
size_changedsignal or specifywindow/handheld/orientationin project.godot.