
godot-adapt-desktop-to-mobile
Expert patterns for porting desktop games to mobile including touch control schemes (virtual joystick, gesture detection), UI scaling for small screens, performance optimization for mobile GPUs, battery life management, and platform-specific features. Use when creating mobile ports or cross-platform mobile builds. Trigger keywords: TouchScreenButton, virtualjoystick, gesturedetector, InputEventScreenTouch, InputEventScreenDrag, mobileoptimization, batterysaving, adaptiveperformance, MOBILEENABLED.
- Installs
- 355
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-adapt-desktop-to-mobile- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-adapt-desktop-to-mobile automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Adapt: Desktop to Mobile
Expert guidance for porting desktop games to mobile platforms.
NEVER Do
- NEVER use mouse position directly — Touch has no "hover" state. Replace mouse_motion with screen_drag and check InputEventScreenTouch.pressed.
- NEVER keep small UI elements — Apple HIG requires 44pt minimum touch targets. Android Material: 48dp. Scale up buttons 2-3x.
- NEVER forget finger occlusion — User's finger blocks 50-100px radius. Position critical info ABOVE touch controls, not below.
- NEVER run at full performance when backgrounded — Mobile OSs kill apps that drain battery in background. Pause physics, reduce FPS to 1-5 when app loses focus.
- NEVER use desktop-only features — Mouse hover, right-click, keyboard shortcuts, scroll wheel don't exist on mobile. Provide touch alternatives.
Available Scripts
MANDATORY: Read the appropriate script before implementing the corresponding pattern. Do not paste joystick/gesture/UI tutorials inline.
dynamic_joystick_spawner.gd
MANDATORY for move sticks — Joystick appears where the user touches the left half (prefer over fixed-position recipes).
virtual_joystick.gd
Fixed-base stick Control — use when UI art requires a static well; otherwise prefer dynamic_joystick_spawner.
gesture_combo_system.gd
MANDATORY for swipe/pinch — Duration/distance/multi-touch ratio → signals.
mobile_ui_adapter.gd
MANDATORY for Control remaps — Scales/reanchors desktop HUD for thumb reach + density.
resolution_scaler.gd
Adaptive scaling_3d_scale to hold 60FPS while keeping 2D UI sharp.
battery_saver_mode.gd
MANDATORY — NOTIFICATION_APPLICATION_PAUSED → Engine.max_fps = 1 + pause physics.
ui_safe_area_margins.gd
DisplayServer.get_display_safe_area() padding for notches / hole-punch.
touch_camera_pan_zoom.gd
1-finger pan + 2-finger pinch Camera2D.
haptic_feedback_manager.gd
Input.vibrate_handheld + iOS plugin hook pattern.
mobile_shader_fallback.gd
Strip SSS/clearcoat/heavy shading on weak mobile renderers.
on_screen_keyboard_handler.gd
Virtual keyboard occlusion → tween UI up. Use for LineEdit/TextEdit focus — not a substitute for HUD scaling.
mobile_ui_adapter.gd vs on_screen_keyboard_handler
| Need | Script |
|---|---|
| Scale/reanchor HUD, spawn virtual sticks, thumb-reach density | mobile_ui_adapter |
| OS virtual keyboard covers focused text field | on_screen_keyboard_handler (often both: adapter for layout, OSK handler for text fields) |
offline_save_sync.gd
MANDATORY — Persist on App Pause (WM_CLOSE is unreliable on mobile kill).
Touch Control Schemes
Decision Matrix
| Genre | Recommended Control | Script |
|---|---|---|
| Platformer | Virtual joystick (left) + jump button (right) | dynamic_joystick_spawner / virtual_joystick |
| Top-down shooter | Dual-stick (move left, aim right) | dynamic_joystick_spawner ×2 |
| Turn-based | Direct tap on units/tiles | gesture_combo_system (tap) |
| Puzzle | Tap, swipe, pinch | gesture_combo_system |
| Card game | Drag-and-drop | mobile_ui_adapter + drag Controls |
| Racing | Tilt or tap left/right | platform-mobile / Input sensors |
Port Procedure (ordered)
- MANDATORY mobile-port-checklist.md — confirm pre-port inventory and gate rows before remapping controls.
- Replace hover/right-click/scroll with touch equivalents (decision matrix).
- MANDATORY safe-area + mobile_ui_adapter for 44–48dp targets; keep critical HUD above fingers.
- Hook battery_saver_mode + offline_save_sync on pause/resume.
- Enable resolution_scaler + mobile_shader_fallback until device FPS is stable.
- Deep Android/iOS IAP/permissions → godot-platform-mobile (Do NOT Load full platform skill until control/UI/perf gates pass).
Edge Cases (checklist)
- Multi-touch index conflicts on dual sticks — track
event.indexper stick - OSK covering LineEdit → on_screen_keyboard_handler.gd
- Background kill without save → offline_save_sync.gd (WM_CLOSE unreliable on mobile)
- Notch clipping → ui_safe_area_margins.gd
- Palm touches screen edge — ignore ~50px border taps
- Desktop test builds: handle both
InputEventMouseButtonandInputEventScreenTouch
Device testing (before ship)
- 44–48dp touch targets on real hardware
- HUD above fingers (50–100px occlusion)
- Pause drops FPS + saves on background
- Stable FPS after resolution_scaler.gd + mobile_shader_fallback.gd
- Portrait + landscape safe areas
Full port recipes → mobile-port-deep.md.
Deep Recipes
MANDATORY when porting beyond the decision matrix: read mobile-port-deep.md. Do NOT Load it for a first-pass control remap.
Expert Techniques (short)
- Capture store screenshots via
await RenderingServer.frame_post_draw+ viewport image. - Debug overlay:
OS.get_memory_info()— do not spam heavy allocs while monitoring.
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
- Using InputEvent — Event pipeline and why
InputEventScreenTouch/InputEventScreenDragreplace hover/mouse-motion assumptions on mobile. - Mouse and input coordinates — Viewport vs canvas transforms so touch positions land on the same UI/game space as desktop mouse tests.
- Input examples — Practical multi-touch and drag patterns that map to virtual joysticks, swipes, and pinch gestures.
- Multiple resolutions — Stretch modes, aspect, and content scale so phone/tablet layouts keep touch targets readable.
- Resolution scaling —
scaling_3d_scale/ FSR tradeoffs used by adaptive quality when mobile GPUs miss frame budget. - Introduction to the 3 rendering methods — Why ports should prefer Mobile or Compatibility over Forward+ for fill-rate and feature set.
- Handling quit requests —
NOTIFICATION_APPLICATION_PAUSED/ resume lifecycle that mobile OSes use instead of reliable window-close saves. - DisplayServer —
get_display_safe_area(), virtual keyboard APIs, and screen metrics behind notches and OSK occlusion. - Using Containers — Margin/Box/Grid container contracts for safe-area padding and large touch targets.
- TouchScreenButton — Built-in on-screen buttons that emit Input actions without custom hit-testing.
- Exporting for Android — Permissions, APK/AAB, and device testing gates after the control/UI port is ready.
- Exporting for iOS — Xcode export, capabilities, and App Store constraints that catch desktop leftovers late.
Related Skills
Prerequisites
- godot-input-handling — Shared InputEvent buffering, deadzones, and multi-touch gesture foundations before building virtual joysticks or swipe combos.
- godot-ui-containers — Anchors, containers, and minimum sizes so 44–48px touch targets and safe-area margins stay layout-correct.
- godot-project-foundations — Feature tags (
mobile/android/ios), display stretch, and renderer defaults that every port branch depends on.
Complements
- godot-platform-mobile — Deeper Android/iOS platform APIs (permissions, IAP, thermal) once the desktop→touch control remap is in place.
- godot-performance-optimization — Profiling and CPU/GPU cuts when adaptive
scaling_3d_scaleand material fallbacks are not enough. - godot-save-load-systems — Durable save ownership that hooks pause/resume instead of desktop-only quit notifications.
- godot-camera-systems — Camera2D/3D follow and zoom contracts used by one-finger pan + two-finger pinch controllers.
- godot-shaders-basics — Cheaper CanvasItem/Spatial shader paths when stripping desktop-only visual features for mobile GPUs.
- godot-3d-materials — StandardMaterial3D feature flags (SSS, clearcoat) that
mobile_shader_fallbackdisables on weak renderers. - godot-tweening — Smooth UI lifts when the OS virtual keyboard covers LineEdits/TextEdits.
- godot-autoload-architecture — Singleton homes for haptic feedback, battery saver, and offline save sync managers.
Downstream / consumers
- godot-export-builds — Packaging, signing, and CI export presets after touch/UI/perf gates pass on devices.
- godot-platform-desktop — Keep desktop mouse/keyboard paths working when the same project remains dual-input after the mobile adapt.
- godot-genre-puzzle — Tap/swipe/pinch control schemes that consume the gesture and UI scaling patterns from this skill.
Master
- godot-master — Library router and mirrored module entry for discovering this adapt skill beside sibling domains.
FAQ
What does the godot-adapt-desktop-to-mobile skill do?
Expert patterns for porting desktop games to mobile including touch control schemes (virtual joystick, gesture detection), UI scaling for small screens, performance optimization for mobile GPUs, battery life management, and platform-specific features. Use when creating mobile ports or cross-platform mobile builds. Trigger keywords: TouchScreenButton, virtualjoystick, gesturedetector, InputEventScreenTouch, InputEventScreenDrag, mobileoptimization, batterysaving, adaptiveperformance, MOBILEENABLED.
How do I install godot-adapt-desktop-to-mobile?
Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-adapt-desktop-to-mobile in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-adapt-desktop-to-mobile/ (personal) or .claude/skills/godot-adapt-desktop-to-mobile/ (project).
Which AI agents can use godot-adapt-desktop-to-mobile?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-adapt-desktop-to-mobile safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains godot-adapt-desktop-to-mobile?
It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 355 recorded installs.
More from thedivergentai/game-dev-agentic-skills
godot-master
thedivergentai/game-dev-agentic-skills
Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.
godot-shaders-basics
thedivergentai/game-dev-agentic-skills
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.
godot-2d-animation
thedivergentai/game-dev-agentic-skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
godot-ui-theming
thedivergentai/game-dev-agentic-skills
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.
godot-gdscript-mastery
thedivergentai/game-dev-agentic-skills
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.
godot-particles
thedivergentai/game-dev-agentic-skills
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.
Popular mobile skills
design-mobile-apps
designed-by-ai/skills
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
ios-design
uizze.sh
Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.
vercel-react-native-skills
vercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
animate-expo
emilkowalski/skills
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
xcode-project-setup
firebase/agent-skills
Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
firebase-remote-config-basics
firebase/agent-skills
Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.