Godot adapt mobile to desktop

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

Godot adapt mobile to desktop is an AI agent skill from the GitHub repository thedivergentai/GD-Agentic-Skills. Expert patterns for scaling mobile games to desktop including mouse/keyboard controls, increased resolution and graphical fidelity, expanded UI layouts, settings menus, window management, and platform-specific features. Use when creating desktop ports or cross-platform releases. Trigger keywords: mo

How to use this skill

Skill file

NEVER Do


Available Scripts

MANDATORY: Read the appropriate script before implementing the corresponding pattern.

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

MANDATORY first read for input remap — Bridges mobile actions to keyboard/mouse without rewriting gameplay. Emits mouse_look_bridge_requested when FPS capture is needed — pair with mouse_capture_look.

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

MANDATORY when UI needs hover — Restores desktop hover/focus affordances mobile never had. Prefer this over ad-hoc mouse_entered dumps.

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

Captured look via InputEventMouseMotion.relative — use for FPS/orbit when adapter alone is not enough.

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

MANDATORY — Windowed / exclusive fullscreen / borderless via DisplayServer.

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

Runtime InputMap remap + ConfigFile persistence.

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

Hardware cursor show/hide/combat vs menu states.

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

VSync / Engine.max_fps unlock for 144Hz+.

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

Native resolution OptionButton from DisplayServer.screen_get_size.

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

MANDATORY — Shrink thumb-sized mobile Controls for mouse density.

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

Mouse-wheel zoom replacing pinch.

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

MANDATORY — set_auto_accept_quit(false) + save prompt on WM close.

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

Launch/place window on the screen under the cursor.


Decision Tree — Input Script Picks

| Need | Use |

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

| Map touch actions → WASD/mouse without rewriting movers | desktop_input_adapter |

| Button/Control hover styles & tooltips | hover_bridge |

| Captured mouselook (FPS/3P orbit) | mouse_capture_look — MANDATORY when aim/Look requires captured relative motion; adapter get_aim_vector() alone is top-down only |

| Rebindable keys | keybinding_remapper |

| Pinch → wheel zoom | scroll_wheel_zoom |

When desktop_input_adapter emits mouse_look_bridge_requested, attach or enable mouse_capture_look.gd on the player/camera rig — do not stop after InputMap injection.

Port Procedure (ordered)

  1. MANDATORY desktop_input_adapter (+ hover_bridge for UI) so every touch action has a precision equivalent.
  2. desktop_ui_scaler + expanded layouts (hotbar/chat/minimap) — godot-ui-containers for structure.
  3. dynamic_window_manager + multi_monitor_handling + quit_confirmation.
  4. resolution_dropdown + uncapped_framerate + graphics quality ladder (persist ConfigFile).
  5. Deeper OS integration → godot-platform-desktop.

Platform Services Decision Tree (Steam / Discord)

| Goal | Decision |

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

| Ship on Steam with cloud/achievements | Add GDExtension bridge (e.g. GodotSteam); keep init behind OS.has_feature("steam") / editor-safe stubs. Do not paste fake Steam.* tutorials into gameplay scripts. |

| Discord Rich Presence only | Prefer a thin GDExtension/plugin; update presence from an Autoload on scene change — never block _ready on network. |

| No store integration this milestone | Cut — omit Steam/Discord code paths entirely; document as future GDExtension spike. |

Deep Recipes

MANDATORY when porting beyond the ordered procedure: read desktop-port-deep.md. Do NOT Load it for a first-pass keyboard/mouse remap.

Testing (before ship)

MANDATORY before declaring the port complete: run desktop-port-testing-checklist.md. Do not inline a partial checklist — use the reference file.

Expert Techniques (short)

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.