[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KR81GZTSAEPJAA5E71MPAD":3,"skill-same:01M6KR81GZTSAEPJAA5E71MPAD":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6KR81GZTSAEPJAA5E71MPAD","dedicated-server",null,"Use when building dedicated servers — headless export, server architecture, lobby management, and deployment","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33],"dedicated server","server","headless","deployment","use","architecture","export","management","when","servers","2026-11-10 10:12:30",false,"---\nname: dedicated-server\ndescription: Use when building dedicated servers — headless export, server architecture, lobby management, and deployment\n---\n\n# Dedicated Server in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, C# follows.\n\n**Related skills:** See **multiplayer-basics** for ENet setup, RPCs, and authority model. See **multiplayer-sync** for state synchronization and interpolation.\n\n---\n\n## 1. Headless Export\n\nA dedicated server runs without a display, GPU, or audio device. Godot supports this through the `--headless` flag and a dedicated export preset.\n\n### --headless Flag\n\nPass `--headless` on the command line to suppress the display and audio drivers at runtime:\n\n```\n.\u002Fmy_game.x86_64 --headless\n```\n\n`--headless` is a runtime flag that works on any exported binary. Godot 4 has no separate server platform or server export template: a dedicated-server export uses the regular template, so the binary keeps its rendering code (a smaller binary needs a custom-compiled template). What the export changes is the PCK and a feature tag — see below.\n\n### Server Export Preset\n\nIn the Godot editor, create a dedicated **Linux** export preset:\n\n1. Open **Project → Export**.\n2. Add a **Linux** preset and name it `Linux Server`.\n3. On the **Resources** tab, set **Export Mode** to **Export as dedicated server**. This adds the `dedicated_server` feature tag — which makes the binary start with the headless display and dummy audio drivers even without `--headless` — and marks `res:\u002F\u002F` as **Strip Visuals**: visual resources are exported as placeholders (e.g. a texture keeps only its size). Set folders the server needs intact to **Keep**.\n4. Use the **Exclude** filter on the same tab to drop client-only files (audio, client-only scenes) from the server PCK entirely.\n\n### Feature Tags\n\nUse `OS.has_feature()` to branch between server and client code at runtime. Define a custom `server` feature on the export preset's **Features** tab (**Custom (comma-separated)** field) or rely on the built-in `dedicated_server` feature that a dedicated-server export sets automatically:\n\n```gdscript\n# boot.gd — autoload, runs before any scene loads\nextends Node\n\nfunc _ready() -> void:\n    if OS.has_feature(\"dedicated_server\") or DisplayServer.get_name() == \"headless\":\n        # Disable rendering-dependent systems\n        RenderingServer.set_render_loop_enabled(false)\n        # Start server logic\n        ServerBootstrap.start()\n    else:\n        # Start client logic\n        ClientBootstrap.start()\n```\n\n```csharp\n\u002F\u002F Boot.cs — autoload, runs before any scene loads.\nusing Godot;\n\npublic partial class Boot : Node\n{\n    public override void _Ready()\n    {\n        if (OS.HasFeature(\"dedicated_server\") || DisplayServer.GetName() == \"headless\")\n        {\n            \u002F\u002F Disable the render loop. The window is invisible but the engine still ticks.\n            RenderingServer.SetRenderLoopEnabled(false);\n            ServerBootstrap.Start();\n        }\n        else\n        {\n            ClientBootstrap.Start();\n        }\n    }\n}\n```\n\n> **Note:** the export preset configuration (custom features, exclude filter, \"Export as dedicated server\" mode) is identical regardless of language — see the GDScript section above for preset settings.\n\n**Feature tag summary:**\n\n| Tag | Set by | Notes |\n|-----|--------|-------|\n| `dedicated_server` | Dedicated-server export | Most reliable way to detect a server binary |\n| *(no tag)* `--headless` | CLI flag | Not a feature tag — `OS.has_feature(\"headless\")` is `false`; check `DisplayServer.get_name() == \"headless\"` |\n| Custom `server` | Your export preset's Custom Features | Useful when sharing a binary between roles |\n\n---\n\n## 2. Server Architecture\n\n### Game Loop Without Rendering\n\nOn a headless server, `_process` and `_physics_process` still run normally — but nothing is rendered. Keep all server logic in `_physics_process` for deterministic, fixed-rate updates.\n\n### GDScript\n\n```gdscript\n# server_main.gd — add as autoload named ServerMain\nextends Node\n\n## Physics frames per second — matches Project Settings → Physics → Common → Physics Ticks Per Second.\n## Override via --tick-rate CLI argument (see Section 5).\nvar tick_rate: int = 60\n\n## Current server tick counter.\nvar server_tick: int = 0\n\n\nfunc _ready() -> void:\n    # Guard: this node does nothing on the client.\n    if not _is_server():\n        set_process(false)\n        set_physics_process(false)\n        return\n\n    Engine.physics_ticks_per_second = tick_rate\n    print(\"[Server] Started — tick rate: %d Hz\" % tick_rate)\n\n\nfunc _physics_process(_delta: float) -> void:\n    server_tick += 1\n    _tick_game_logic()\n\n\nfunc _tick_game_logic() -> void:\n    # All authoritative game simulation goes here.\n    # Never reference Camera, CanvasLayer, or any rendering node from this path.\n    pass\n\n\n## Returns true when this process is acting as the authoritative server.\nfunc _is_server() -> bool:\n    # Covers both: dedicated binary and hosted listen-server.\n    return multiplayer.is_server()\n```\n\n### Server-Only Logic Separated from Client\n\nStructure your scenes so server-only nodes are in a dedicated branch and skipped on clients:\n\n```gdscript\n# world.gd\nextends Node\n\n@onready var server_systems: Node = $ServerSystems   # physics, AI, scoring\n@onready var client_systems: Node = $ClientSystems   # camera, HUD, audio\n\n\nfunc _ready() -> void:\n    # Disable server systems on clients and vice versa.\n    server_systems.set_process_mode(\n        PROCESS_MODE_ALWAYS if multiplayer.is_server() else PROCESS_MODE_DISABLED\n    )\n    client_systems.set_process_mode(\n        PROCESS_MODE_DISABLED if multiplayer.is_server() else PROCESS_MODE_ALWAYS\n    )\n```\n\n### Engine.is_editor_hint() + is_server Checks\n\nUse these guards at the top of scripts that must behave differently in the editor, on the server, and on clients:\n\n```gdscript\nfunc _ready() -> void:\n    if Engine.is_editor_hint():\n        return  # Skip all runtime setup in editor preview\n\n    if multiplayer.is_server():\n        _server_init()\n    else:\n        _client_init()\n\n\nfunc _server_init() -> void:\n    print(\"[Server] Initializing authoritative state\")\n\n\nfunc _client_init() -> void:\n    print(\"[Client] Initializing local presentation layer\")\n```\n\n### C#\n\n```csharp\n\u002F\u002F ServerMain.cs — add as autoload named ServerMain\nusing Godot;\n\npublic partial class ServerMain : Node\n{\n    \u002F\u002F\u002F \u003Csummary>Physics ticks per second. Override via --tick-rate CLI argument.\u003C\u002Fsummary>\n    public int TickRate { get; set; } = 60;\n\n    \u002F\u002F\u002F \u003Csummary>Current server tick counter.\u003C\u002Fsummary>\n    public int ServerTick { get; private set; }\n\n    public override void _Ready()\n    {\n        if (!IsServer())\n        {\n            SetProcess(false);\n            SetPhysicsProcess(false);\n            return;\n        }\n\n        Engine.PhysicsTicksPerSecond = TickRate;\n        GD.Print($\"[Server] Started — tick rate: {TickRate} Hz\");\n    }\n\n    public override void _PhysicsProcess(double delta)\n    {\n        ServerTick++;\n        TickGameLogic();\n    }\n\n    private void TickGameLogic()\n    {\n        \u002F\u002F All authoritative game simulation goes here.\n    }\n\n    private bool IsServer() => Multiplayer.IsServer();\n}\n```\n\n```csharp\n\u002F\u002F World.cs\nusing Godot;\n\npublic partial class World : Node\n{\n    [Export] private Node _serverSystems = null!;\n    [Export] private Node _clientSystems = null!;\n\n    public override void _Ready()\n    {\n        if (Engine.IsEditorHint()) return;\n\n        _serverSystems.ProcessMode = Multiplayer.IsServer()\n            ? ProcessModeEnum.Always\n            : ProcessModeEnum.Disabled;\n\n        _clientSystems.ProcessMode = Multiplayer.IsServer()\n            ? ProcessModeEnum.Disabled\n            : ProcessModeEnum.Always;\n    }\n}\n```\n\n---\n\n## 3. Lobby System\n\nA per-player state dictionary keyed by `peer_id` is the canonical pattern. Server holds the authoritative dict; clients receive updates via RPC. Implement a `--max-players` CLI cap and a ready-toggle RPC so all peers can confirm before starting.\n\n> See [references\u002Flobby-management.md](references\u002Flobby-management.md) for the full GDScript and C# lobby implementation (player_list dict, max-players cap, ready toggle RPC, broadcast pattern).\n\n---\n\n## 4. Match Flow\n\nDrive lobby → countdown → in-game → results with a state machine. Server is authoritative — clients only receive state-change RPCs. Common states: `LOBBY`, `COUNTDOWN`, `IN_GAME`, `RESULTS`.\n\n> See [references\u002Fmatch-flow.md](references\u002Fmatch-flow.md) for the full state machine with countdown\u002Fresults timers and GDScript + C# implementations.\n\n---\n\n## 5. Server Configuration\n\nParse CLI flags from `OS.get_cmdline_args()` for `--port`, `--max-players`, `--tick-rate`, `--log-level`. Pre-set `Engine.physics_ticks_per_second` *before* the first physics frame; reading and writing the others is straightforward `match` \u002F `switch` work.\n\n> See [references\u002Fserver-config.md](references\u002Fserver-config.md) for the GDScript and C# argument-parsing helper that reads all four flags safely at startup.\n\n---\n\n## 6. Deployment\n\nA Linux VPS with a `Dockerfile` and `systemd` service file is the standard production layout. The Dockerfile bundles the exported binary, its PCK, and for C# projects the `data_*` folder that holds the assemblies and the bundled .NET runtime. systemd handles auto-restart, log rotation via `journald`, and resource limits.\n\n> See [references\u002Fdeployment.md](references\u002Fdeployment.md) for the Dockerfile, the Linux VPS setup steps, the systemd unit file, and log-rotation configuration.\n\n---\n\n## 7. Checklist\n\n- [ ] Headless export preset created and `dedicated_server` feature tag added\n- [ ] `RenderingServer.set_render_loop_enabled(false)` (and audio bus muted) when `OS.has_feature(\"dedicated_server\")` is true\n- [ ] Server-side autoloads check `multiplayer.is_server()` before initializing systems\n- [ ] CLI args parsed at startup for port, max-players, tick-rate, log-level; `ServerConfig` parses them from CLI args before `_ready()` of other autoloads\n- [ ] Lobby state lives only on the server; clients receive updates via RPC\n- [ ] Match-flow state machine has explicit transitions and a single source of truth (server)\n- [ ] Production deployment uses systemd or Docker for auto-restart and log rotation\n- [ ] Headless build is exported with **Export with Debug** off in production presets\n- [ ] Export preset is exported as a dedicated server (`dedicated_server` feature is set automatically)\n- [ ] Client-only assets (shaders, audio, high-res textures) are excluded from the server PCK\n- [ ] Boot script checks `OS.has_feature(\"dedicated_server\")` or `DisplayServer.get_name() == \"headless\"` to branch server vs client startup\n- [ ] Server-only nodes use `PROCESS_MODE_DISABLED` on clients; client-only nodes use `PROCESS_MODE_DISABLED` on the server\n- [ ] `Engine.is_editor_hint()` guard at the top of `_ready()` in every script that has side effects\n- [ ] Config file loading falls back gracefully when `server.cfg` does not exist\n- [ ] Environment variables (`SERVER_PORT`, `SERVER_MAX_PLAYERS`, `SERVER_TICK_RATE`) are applied after config file, before CLI args\n- [ ] `LobbyManager.player_list` size is checked against `max_players` before accepting a new peer\n- [ ] Peer is kicked via RPC before closing if the lobby is full\n- [ ] Ready states are reset when `MatchState` returns to `LOBBY` so players must re-confirm each round\n- [ ] `MatchManager` only runs `_physics_process` on the server (`SetPhysicsProcess(false)` on clients)\n- [ ] Countdown and results timers are driven by `_physics_process` delta, not `Timer` nodes (avoids scene dependency)\n- [ ] Dockerfile copies the binary and the `.pck` file (plus the `data_\u003Cproject>_\u003Cplatform>_\u003Carch>` folder for C#) to the image\n- [ ] UDP port is opened in the VPS firewall before the first test run\n- [ ] systemd service has `Restart=on-failure` so the server recovers from crashes automatically\n- [ ] Logs are routed to the systemd journal and inspectable with `journalctl -u \u003Cservice> -f`\n","# Dedicated Server in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, C# follows.\n\n**Related skills:** See **multiplayer-basics** for ENet setup, RPCs, and authority model. See **multiplayer-sync** for state synchronization and interpolation.\n\n---\n\n## 1. Headless Export\n\nA dedicated server runs without a display, GPU, or audio device. Godot supports this through the `--headless` flag and a dedicated export preset.\n\n### --headless Flag\n\nPass `--headless` on the command line to suppress the display and audio drivers at runtime:\n\n```\n.\u002Fmy_game.x86_64 --headless\n```\n\n`--headless` is a runtime flag that works on any exported binary. Godot 4 has no separate server platform or server export template: a dedicated-server export uses the regular template, so the binary keeps its rendering code (a smaller binary needs a custom-compiled template). What the export changes is the PCK and a feature tag — see below.\n\n### Server Export Preset\n\nIn the Godot editor, create a dedicated **Linux** export preset:\n\n1. Open **Project → Export**.\n2. Add a **Linux** preset and name it `Linux Server`.\n3. On the **Resources** tab, set **Export Mode** to **Export as dedicated server**. This adds the `dedicated_server` feature tag — which makes the binary start with the headless display and dummy audio drivers even without `--headless` — and marks `res:\u002F\u002F` as **Strip Visuals**: visual resources are exported as placeholders (e.g. a texture keeps only its size). Set folders the server needs intact to **Keep**.\n4. Use the **Exclude** filter on the same tab to drop client-only files (audio, client-only scenes) from the server PCK entirely.\n\n### Feature Tags\n\nUse `OS.has_feature()` to branch between server and client code at runtime. Define a custom `server` feature on the export preset's **Features** tab (**Custom (comma-separated)** field) or rely on the built-in `dedicated_server` feature that a dedicated-server export sets automatically:\n\n```gdscript\n# boot.gd — autoload, runs before any scene loads\nextends Node\n\nfunc _ready() -> void:\n    if OS.has_feature(\"dedicated_server\") or DisplayServer.get_name() == \"headless\":\n        # Disable rendering-dependent systems\n        RenderingServer.set_render_loop_enabled(false)\n        # Start server logic\n        ServerBootstrap.start()\n    else:\n        # Start client logic\n        ClientBootstrap.start()\n```\n\n```csharp\n\u002F\u002F Boot.cs — autoload, runs before any scene loads.\nusing Godot;\n\npublic partial class Boot : Node\n{\n    public override void _Ready()\n    {\n        if (OS.HasFeature(\"dedicated_server\") || DisplayServer.GetName() == \"headless\")\n        {\n            \u002F\u002F Disable the render loop. The window is invisible but the engine still ticks.\n            RenderingServer.SetRenderLoopEnabled(false);\n            ServerBootstrap.Start();\n        }\n        else\n        {\n            ClientBootstrap.Start();\n        }\n    }\n}\n```\n\n> **Note:** the export preset configuration (custom features, exclude filter, \"Export as dedicated server\" mode) is identical regardless of language — see the GDScript section above for preset settings.\n\n**Feature tag summary:**\n\n| Tag | Set by | Notes |\n|-----|--------|-------|\n| `dedicated_server` | Dedicated-server export | Most reliable way to detect a server binary |\n| *(no tag)* `--headless` | CLI flag | Not a feature tag — `OS.has_feature(\"headless\")` is `false`; check `DisplayServer.get_name() == \"headless\"` |\n| Custom `server` | Your export preset's Custom Features | Useful when sharing a binary between roles |\n\n---\n\n## 2. Server Architecture\n\n### Game Loop Without Rendering\n\nOn a headless server, `_process` and `_physics_process` still run normally — but nothing is rendered. Keep all server logic in `_physics_process` for deterministic, fixed-rate updates.\n\n### GDScript\n\n```gdscript\n# server_main.gd — add as autoload named ServerMain\nextends Node\n\n## Physics frames per second — matches Project Settings → Physics → Common → Physics Ticks Per Second.\n## Override via --tick-rate CLI argument (see Section 5).\nvar tick_rate: int = 60\n\n## Current server tick counter.\nvar server_tick: int = 0\n\n\nfunc _ready() -> void:\n    # Guard: this node does nothing on the client.\n    if not _is_server():\n        set_process(false)\n        set_physics_process(false)\n        return\n\n    Engine.physics_ticks_per_second = tick_rate\n    print(\"[Server] Started — tick rate: %d Hz\" % tick_rate)\n\n\nfunc _physics_process(_delta: float) -> void:\n    server_tick += 1\n    _tick_game_logic()\n\n\nfunc _tick_game_logic() -> void:\n    # All authoritative game simulation goes here.\n    # Never reference Camera, CanvasLayer, or any rendering node from this path.\n    pass\n\n\n## Returns true when this process is acting as the authoritative server.\nfunc _is_server() -> bool:\n    # Covers both: dedicated binary and hosted listen-server.\n    return multiplayer.is_server()\n```\n\n### Server-Only Logic Separated from Client\n\nStructure your scenes so server-only nodes are in a dedicated branch and skipped on clients:\n\n```gdscript\n# world.gd\nextends Node\n\n@onready var server_systems: Node = $ServerSystems   # physics, AI, scoring\n@onready var client_systems: Node = $ClientSystems   # camera, HUD, audio\n\n\nfunc _ready() -> void:\n    # Disable server systems on clients and vice versa.\n    server_systems.set_process_mode(\n        PROCESS_MODE_ALWAYS if multiplayer.is_server() else PROCESS_MODE_DISABLED\n    )\n    client_systems.set_process_mode(\n        PROCESS_MODE_DISABLED if multiplayer.is_server() else PROCESS_MODE_ALWAYS\n    )\n```\n\n### Engine.is_editor_hint() + is_server Checks\n\nUse these guards at the top of scripts that must behave differently in the editor, on the server, and on clients:\n\n```gdscript\nfunc _ready() -> void:\n    if Engine.is_editor_hint():\n        return  # Skip all runtime setup in editor preview\n\n    if multiplayer.is_server():\n        _server_init()\n    else:\n        _client_init()\n\n\nfunc _server_init() -> void:\n    print(\"[Server] Initializing authoritative state\")\n\n\nfunc _client_init() -> void:\n    print(\"[Client] Initializing local presentation layer\")\n```\n\n### C#\n\n```csharp\n\u002F\u002F ServerMain.cs — add as autoload named ServerMain\nusing Godot;\n\npublic partial class ServerMain : Node\n{\n    \u002F\u002F\u002F \u003Csummary>Physics ticks per second. Override via --tick-rate CLI argument.\u003C\u002Fsummary>\n    public int TickRate { get; set; } = 60;\n\n    \u002F\u002F\u002F \u003Csummary>Current server tick counter.\u003C\u002Fsummary>\n    public int ServerTick { get; private set; }\n\n    public override void _Ready()\n    {\n        if (!IsServer())\n        {\n            SetProcess(false);\n            SetPhysicsProcess(false);\n            return;\n        }\n\n        Engine.PhysicsTicksPerSecond = TickRate;\n        GD.Print($\"[Server] Started — tick rate: {TickRate} Hz\");\n    }\n\n    public override void _PhysicsProcess(double delta)\n    {\n        ServerTick++;\n        TickGameLogic();\n    }\n\n    private void TickGameLogic()\n    {\n        \u002F\u002F All authoritative game simulation goes here.\n    }\n\n    private bool IsServer() => Multiplayer.IsServer();\n}\n```\n\n```csharp\n\u002F\u002F World.cs\nusing Godot;\n\npublic partial class World : Node\n{\n    [Export] private Node _serverSystems = null!;\n    [Export] private Node _clientSystems = null!;\n\n    public override void _Ready()\n    {\n        if (Engine.IsEditorHint()) return;\n\n        _serverSystems.ProcessMode = Multiplayer.IsServer()\n            ? ProcessModeEnum.Always\n            : ProcessModeEnum.Disabled;\n\n        _clientSystems.ProcessMode = Multiplayer.IsServer()\n            ? ProcessModeEnum.Disabled\n            : ProcessModeEnum.Always;\n    }\n}\n```\n\n---\n\n## 3. Lobby System\n\nA per-player state dictionary keyed by `peer_id` is the canonical pattern. Server holds the authoritative dict; clients receive updates via RPC. Implement a `--max-players` CLI cap and a ready-toggle RPC so all peers can confirm before starting.\n\n> See [references\u002Flobby-management.md](references\u002Flobby-management.md) for the full GDScript and C# lobby implementation (player_list dict, max-players cap, ready toggle RPC, broadcast pattern).\n\n---\n\n## 4. Match Flow\n\nDrive lobby → countdown → in-game → results with a state machine. Server is authoritative — clients only receive state-change RPCs. Common states: `LOBBY`, `COUNTDOWN`, `IN_GAME`, `RESULTS`.\n\n> See [references\u002Fmatch-flow.md](references\u002Fmatch-flow.md) for the full state machine with countdown\u002Fresults timers and GDScript + C# implementations.\n\n---\n\n## 5. Server Configuration\n\nParse CLI flags from `OS.get_cmdline_args()` for `--port`, `--max-players`, `--tick-rate`, `--log-level`. Pre-set `Engine.physics_ticks_per_second` *before* the first physics frame; reading and writing the others is straightforward `match` \u002F `switch` work.\n\n> See [references\u002Fserver-config.md](references\u002Fserver-config.md) for the GDScript and C# argument-parsing helper that reads all four flags safely at startup.\n\n---\n\n## 6. Deployment\n\nA Linux VPS with a `Dockerfile` and `systemd` service file is the standard production layout. The Dockerfile bundles the exported binary, its PCK, and for C# projects the `data_*` folder that holds the assemblies and the bundled .NET runtime. systemd handles auto-restart, log rotation via `journald`, and resource limits.\n\n> See [references\u002Fdeployment.md](references\u002Fdeployment.md) for the Dockerfile, the Linux VPS setup steps, the systemd unit file, and log-rotation configuration.\n\n---\n\n## 7. Checklist\n\n- [ ] Headless export preset created and `dedicated_server` feature tag added\n- [ ] `RenderingServer.set_render_loop_enabled(false)` (and audio bus muted) when `OS.has_feature(\"dedicated_server\")` is true\n- [ ] Server-side autoloads check `multiplayer.is_server()` before initializing systems\n- [ ] CLI args parsed at startup for port, max-players, tick-rate, log-level; `ServerConfig` parses them from CLI args before `_ready()` of other autoloads\n- [ ] Lobby state lives only on the server; clients receive updates via RPC\n- [ ] Match-flow state machine has explicit transitions and a single source of truth (server)\n- [ ] Production deployment uses systemd or Docker for auto-restart and log rotation\n- [ ] Headless build is exported with **Export with Debug** off in production presets\n- [ ] Export preset is exported as a dedicated server (`dedicated_server` feature is set automatically)\n- [ ] Client-only assets (shaders, audio, high-res textures) are excluded from the server PCK\n- [ ] Boot script checks `OS.has_feature(\"dedicated_server\")` or `DisplayServer.get_name() == \"headless\"` to branch server vs client startup\n- [ ] Server-only nodes use `PROCESS_MODE_DISABLED` on clients; client-only nodes use `PROCESS_MODE_DISABLED` on the server\n- [ ] `Engine.is_editor_hint()` guard at the top of `_ready()` in every script that has side effects\n- [ ] Config file loading falls back gracefully when `server.cfg` does not exist\n- [ ] Environment variables (`SERVER_PORT`, `SERVER_MAX_PLAYERS`, `SERVER_TICK_RATE`) are applied after config file, before CLI args\n- [ ] `LobbyManager.player_list` size is checked against `max_players` before accepting a new peer\n- [ ] Peer is kicked via RPC before closing if the lobby is full\n- [ ] Ready states are reset when `MatchState` returns to `LOBBY` so players must re-confirm each round\n- [ ] `MatchManager` only runs `_physics_process` on the server (`SetPhysicsProcess(false)` on clients)\n- [ ] Countdown and results timers are driven by `_physics_process` delta, not `Timer` nodes (avoids scene dependency)\n- [ ] Dockerfile copies the binary and the `.pck` file (plus the `data_\u003Cproject>_\u003Cplatform>_\u003Carch>` folder for C#) to the image\n- [ ] UDP port is opened in the VPS firewall before the first test run\n- [ ] systemd service has `Restart=on-failure` so the server recovers from crashes automatically\n- [ ] Logs are routed to the systemd journal and inspectable with `journalctl -u \u003Cservice> -f`\n",{"name":5,"description":7},"master","60c28fdc40706a24576731e9fb3508b9c95258ad","skills\u002Fdedicated-server",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add jame581\u002FGodotPrompter --skill dedicated-server",{"tool":54,"command":55},"bunx","bunx skills add jame581\u002FGodotPrompter --skill dedicated-server",{"tool":57,"command":58},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill dedicated-server","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002FSKILL.md",true,[62,68,72,76],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fdeployment.md","REFERENCE","参考文档",4358,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002Freferences\u002Fdeployment.md",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Flobby-management.md",9462,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002Freferences\u002Flobby-management.md",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fmatch-flow.md",6433,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002Freferences\u002Fmatch-flow.md",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fserver-config.md",5171,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fdedicated-server\u002Freferences\u002Fserver-config.md",[81,100,121,147,171,189],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":34},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[88,89,32,27,90,91,92,93,94,95,96,28,97,98,99],"xr development","development","godot","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":34},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[107,108,109,110,111,112,113,114,28,32,90,115,116,117,118,119,120],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":130,"publishedAt":34},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[127],{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[108,30,131,132,133,134,135,136,116,137,138,32,139,140,141,142,143,144,28,145,146,25],"web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":161,"publishedAt":34},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":157,"categoryName":158,"taxonomyType":159,"taxonomyTypeDesc":160},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[90,162,163,164,165,28,166,167,168,169,170],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":34},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[178,179,28,180,181,182,183,184,185,186,187,32,188],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","common","implementing","sequences",{"skillNo":190,"name":191,"nameZh":6,"description":192,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":193,"categories":194,"keywords":195,"publishedAt":34},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[196,197,198,90,32,199,200,201,202,203,164,28,187,204],"state","state machine","machine","patterns","node","fsm","state machines","trade","trade-offs"]