Godot platform mobile

From thedivergentai/GD-Agentic-Skills · View interactive version

Godot platform mobile is an AI agent skill from the GitHub repository thedivergentai/GD-Agentic-Skills. Expert blueprint for mobile platforms (Android/iOS) covering touch controls, virtual joysticks, responsive UI, safe areas (notches), battery optimization, and app store guidelines. Use when targeting mobile releases or implementing touch input. Keywords mobile, Android, iOS, touch, InputEventScreenT

How to use this skill

Skill file

Platform: Mobile

Touch-first input, safe area handling, and battery optimization define mobile development.

NEVER Do (Expert Mobile Rules)

Input & Display

Battery & Performance

Permissions & OS Integration


Available Scripts

MANDATORY: Pick the golden-path branch, then load only the matching scripts.

Golden path

  1. Run the decision tree below (control × orientation × renderer).
  2. Touch / stick → mobile_gesture_recognizer.gd (+ input skill for action maps). Built-in virtual joystick when sufficient.
  3. Layout / notches → adaptive_safe_area_inset.gd + orientation_layout_adaptor.gd.
  4. Lifecycle / thermal → thermal_throttle_monitor.gd (pause FPS + heat).
  5. Permissions / share / IAP → android_runtime_permissions.gd, native_share_invoker.gd, mobile_iap_flow_boilerplate.gd as needed.
  6. VRAM / compression → mobile_vram_optimizer.gd.

Script index

[mobile_gesture_recognizer.gd](scripts/mobile_gesture_recognizer.gd)

Expert multi-touch logic for pinch-to-zoom and two-finger rotation.

[adaptive_safe_area_inset.gd](scripts/adaptive_safe_area_inset.gd)

Dynamic safe-area (notch) handling using DisplayServer insets.

[thermal_throttle_monitor.gd](scripts/thermal_throttle_monitor.gd)

Battery and heat management via NOTIFICATION_APPLICATION_PAUSED.

[mobile_iap_flow_boilerplate.gd](scripts/mobile_iap_flow_boilerplate.gd)

Unified boilerplate for Android/iOS In-App Purchases (IAP).

[haptic_pattern_generator.gd](scripts/haptic_pattern_generator.gd)

Advanced vibration patterns for mobile haptic feedback.

[android_runtime_permissions.gd](scripts/android_runtime_permissions.gd)

Expert Android permission requesting and verification logic.

[mobile_sensor_fusion.gd](scripts/mobile_sensor_fusion.gd)

Stable motion controls using Accelerometer and Gravity fusion.

[orientation_layout_adaptor.gd](scripts/orientation_layout_adaptor.gd)

Adaptive UI swapping for Landscape/Portrait transitions.

[mobile_vram_optimizer.gd](scripts/mobile_vram_optimizer.gd)

VRAM monitoring and texture compression enforcement rules.

[native_share_invoker.gd](scripts/native_share_invoker.gd)

OS-level native share sheet integration for social features.

[platform_mobile_patterns.gd](scripts/platform_mobile_patterns.gd) / [mobile_safe_area_handler.gd](scripts/mobile_safe_area_handler.gd)

Additional patterns / legacy safe-area helper — load only if golden-path scripts insufficient.


Decision tree (before implementation)

| Axis | Choose | Implies |

|------|--------|---------|

| Control scheme | Tap/gesture vs virtual stick vs tilt | Gestures → mobile_gesture_recognizer.gd; stick → built-in joystick / Control stick; tilt → mobile_sensor_fusion.gd |

| Orientation | Locked landscape / portrait / adaptive | Adaptive → MANDATORY orientation_layout_adaptor.gd + size_changed |

| Renderer | Mobile vs Compatibility | Never Forward+ on phone GPUs; ETC2/ASTC on; precompile shaders on load screens |

Touch input uses InputEventScreenTouch / InputEventScreenDrag — not mouse emulation.

Project settings (mobile)

[rendering]
renderer/rendering_method="mobile"
textures/vram_compression/import_etc2_astc=true

[display]
window/handheld/orientation="landscape"

App Store Metadata

Ship-gate checks (WHY)

  1. ANR I/O — Large saves/loads on the main thread trip Android ANR. WHY: OS kills unresponsive apps. Gate: background threads / WorkerThreadPool for disk I/O.
  2. Pause FPS — Backgrounded apps left at 60 FPS drain battery and heat the SoC. WHY: NOTIFICATION_APPLICATION_PAUSED must drop Engine.max_fps (see thermal_throttle_monitor.gd).
  3. Permission timing — Request Android permissions at the feature moment (mic, photos), not on cold boot. WHY: Play policy + user trust; verify with OS.get_granted_permissions() via android_runtime_permissions.gd.

Expert notes (script-first)

Deep dives (on demand)

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API;

load Related Skills when routing work to a peer domain — do not preload the whole lattice.

Official Documentation

Related Skills

Prerequisites
Complements
Downstream / consumers
Master
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.