Logo Godot Platform Console

Godot Platform Console

Cộng đồng
bgrenat
godot-platform-console

Expert blueprint for console platforms (PlayStation, Xbox, Nintendo Switch) covering controller-first UI, certification requirements (TRCs/TCRs), platform services (achievements, cloud saves), and performance compliance. Use when targeting console releases or implementing gamepad-only interfaces. Keywords console, PlayStation, Xbox, Switch, TRC, TCR, certification, controller, gamepad, achievements.

Tổng quan

Nhà phát hànhbgrenat
Kho mãgodot-game-dev-studio
Tên kỹ nănggodot-platform-console
Sao
27
Bản fork
3
Tệp đi kèm
12
Giấy phépLGPL-3.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 12 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được bgrenat công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Godot Platform Console trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-platform-console
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bgrenat/godot-game-dev-studio.git /tmp/godot-game-dev-studio
mkdir -p .claude/skills
cp -r /tmp/godot-game-dev-studio/skills/godot-platform-console .claude/skills/godot-platform-console
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Godot Platform Console trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Godot Platform Console ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Godot Platform Console với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Platform: Console

Controller-first design, certification compliance, and locked frame rates define console development.

NEVER Do

  • NEVER show a mouse cursor — Showing a cursor on a console is a certification (TRC/TCR) failure. Hide it using Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN).
  • NEVER skip pausing on focus loss — If a player presses the Home button and the game keeps running, it's a certification violation. Monitor NOTIFICATION_APPLICATION_FOCUS_OUT and force a pause.
  • NEVER use an unlocked frame rate — Variable FPS leads to screen tearing and rejections. Lock specifically to 30 or 60 FPS using Engine.max_fps and enable VSync.
  • NEVER forget D-Pad navigation — UI that is only navigable with an analog stick is an accessibility failure. Always support D-Pad inputs for all menu interactions.
  • NEVER hardcode button labels — Displaying "Press A" on a PlayStation controller is a major mistake. Use Input.get_joy_button_string() or dynamic icon mapping based on the controller's GUID.
  • NEVER exceed hardware memory limits — Consoles (especially Switch) have very rigid RAM budgets. Exceeding them causes OS-level crashes. Profile strictly using the memory tab in the Godot Profiler.
  • NEVER assume Joypad 0 is always Player 1 — Users may connect controllers in any order. Always query active connections dynamically using Input.get_connected_joypads().
  • NEVER distribute console export templates or SDKs publicly — Console SDKs are strictly under Non-Disclosure Agreements (NDAs). Leaking these can lead to legal action and developer banishment.
  • NEVER handle continuous analog stick input using boolean checks — Using is_action_pressed() for sticks ignores deadzones and precision. Use get_vector() or get_action_strength() for smooth movement.
  • NEVER vibrate controllers continuously without an option to disable it — Always use Input.start_joy_vibration() with finite durations and provide an accessibility toggle to turn off haptics.
  • NEVER expect traditional OS window manipulation to function on consoles — Consoles operate in fixed fullscreen environments. Methods like DisplayServer.window_set_mode() will typically fail or be ignored.
  • NEVER map UI interactions manually to raw button indices — Always utilize the Project Input Map (u_accept, u_cancel). This allows Godot to dynamically route gamepad events regardless of the specific hardware.
  • NEVER rely on NOTIFICATION_WM_CLOSE_REQUEST for termination — Consoles often use background suspension (similar to mobile) rather than explicit window closing.
  • NEVER query inputs without flushing buffered events for frame-perfect logic — Use Input.flush_buffered_events() before critical checks to ensure responsiveness.
  • NEVER use == or != to evaluate analog trigger axes — Floating-point precision loss makes exact equality comparison unreliable. Use is_equal_approx() for analog values.
  • NEVER leave orphaned nodes in memory during scene transitions — Strict RAM limits mandate aggressive cleanup. Always use queue_free() and avoid cyclic references that prevent garbage collection.

Godot 4.7: Console Input

  • Use InputEvent.DEVICE_ID_* constants — never assume device 0 is mouse/keyboard.

Available Scripts

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

certification_manager.gd

Expert TRC/TCR compliance (focus loss, controller disconnects).

performance_scaler_fsr.gd

Dynamic Resolution Scaling and FSR 2.2 management for console performance.

server_side_projectile.gd

Direct RenderingServer/PhysicsServer bypass for high-frequency objects.

async_save_manager.gd

Atomic, corruption-resistant threaded save system.

controller_prompt_mapper.gd

GUID-based button prompt detection (PlayStation/Xbox/Switch).

memory_budget_guard.gd

Strict RAM monitoring for platform-specific hardware budgets.

platform_dialog_invoker.gd

Native OS dialog and virtual keyboard abstraction.

background_data_prefetcher.gd

Asset pre-fetching using WorkerThreadPool to avoid level-load stutters.

achievement_offline_queue.gd

Achievement/Trophy caching with offline persistence.

console_boot_config.gd

Hardware-aware hardware initialization and rendering overrides.


NEVER Do (Expert Console Rules)

Certification & TRC

  • NEVER show a mouse cursor — Rejection (TRC/TCR) failure. Hide using Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN).
  • NEVER skip pausing on focus loss — Rejection violation. Monitor NOTIFICATION_APPLICATION_FOCUS_OUT.
  • NEVER let a controller disconnect go unhandled — Must force pause and show "Reconnect Controller" UI.

Performance & Hardware

  • NEVER use an unlocked frame rate — Leads to tearing and instability. Lock specifically (30/60) using Engine.max_fps.
  • NEVER exceed hardware memory limits — Switch has rigid RAM budgets. Monitor via OS.get_static_memory_usage().
  • NEVER ignore VSync — Console displays expect VSync. Always enable in DisplayServer.

Architecture & Safety

  • NEVER assume Joypad 0 is Player 1 — Users switch slots. Query Input.get_connected_joypads() dynamically.
  • NEVER write to res:// at runtime — Rejection failure. Exported binaries are read-only. Strictly use user://.
  • NEVER save synchronously — Main-thread stutters trigger TCR warnings. Offload to WorkerThreadPool.
  • NEVER skip atomic renames for saves — Power loss mid-save must not corrupt data. Write to .tmp then rename.

Input Handling

gdscript
func _input(event: InputEvent) -> void:
    if event is InputEventJoypadButton:
        match event.button_index:
            JOY_BUTTON_A:
                on_confirm()
            JOY_BUTTON_B:
                on_cancel()

Performance Requirements

  • Locked 30/60 FPS - No drops allowed
  • Memory limits - Strict budgets
  • Certification testing - QA required

Platform Services

  • Achievements/Trophies
  • Cloud saves
  • Multiplayer matchmaking
  • Platform friends

Best Practices

  1. Controller-Only - No mouse/keyboard
  2. Pause on Focus Loss - Required
  3. Save Prompts - Must notify saves
  4. Certification - Follow TRCs/TCRs

1. Platform-Overlay-Manager (Native UI Dialogs)

To comply with strict console certification (TRCs), avoid custom UI for critical system messages. Use DisplayServer.dialog_show() to invoke native platform dialogs, ensuring the message is handled by the OS.

gdscript
class_name PlatformOverlayManager extends Node
## Invokes native OS dialogs for system compliance.

func show_native_alert(title: String, msg: String) -> void:
    if DisplayServer.has_feature(DisplayServer.FEATURE_SUBWINDOWS):
        # Native OS dialog integration.
        DisplayServer.dialog_show(title, msg, ["OK"], _on_dialog_closed)
    else:
        # Fallback to blocking OS alert.
        OS.alert(msg, title)

func _on_dialog_closed(button_index: int) -> void:
    print("Native dialog closed: ", button_index)

2. Shader-Binary-Caching (RenderingDevice)

Consoles use fixed hardware. Enable rendering/shader_compiler/shader_cache/enabled and use RenderingDevice.shader_compile_binary_from_spirv() to compile GPU-optimized binaries, reducing runtime stuttering.

gdscript
class_name ConsoleShaderManager extends Node
## Manages GPU-specific shader binary compilation.

func get_device_uuid() -> String:
    var rd := RenderingServer.get_rendering_device()
    if rd:
        # Unique ID for the specific GPU and Driver.
        return rd.get_device_pipeline_cache_uuid()
    return ""

3. Controller-Battery-Telemetry Hook

Monitor controller health using Input.joy_connection_changed and Input.get_joy_info(). While battery level requires a platform-specific GDExtension, the telemetry hook queries the hardware identification string.

gdscript
class_name ControllerTelemetry extends Node
## Tracks controller states and hardware metadata.

func _ready() -> void:
    Input.joy_connection_changed.connect(_on_joy_changed)

func _on_joy_changed(id: int, connected: bool) -> void:
    if connected:
        var info := Input.get_joy_info(id)
        # Tracks hardware GUID and XInput index for telemetry logs.
        print("Controller %d: %s" % [id, info.get("xinput_index", "Native")])

Reference

  • Related: godot-export-builds, godot-input-handling

Related

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Godot Platform Console làm được gì?

Expert blueprint for console platforms (PlayStation, Xbox, Nintendo Switch) covering controller-first UI, certification requirements (TRCs/TCRs), platform services (achievements, cloud saves), and performance compliance. Use when targeting console releases or implementing gamepad-only interfaces. Keywords console, PlayStation, Xbox, Switch, TRC, TCR, certification, controller, gamepad, achievements.

Vì sao nên dùng Godot Platform Console trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Godot Platform Console là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Godot Platform Console trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-platform-console. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Godot Platform Console?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Godot Platform Console với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Godot Platform Console với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Godot Platform Console có miễn phí không?

Có. Kỹ năng này được bgrenat phát hành trên GitHub theo giấy phép LGPL-3.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇