$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-battle-royaleExpert blueprint for Battle Royale games including shrinking zone/storm mechanics (phase-based, damage scaling), large-scale networking (relevancy, tick rate optimization), deployment systems (plane, freefall, parachute), loot spawning (weighted tables, rarity), and performance o
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Battle Royale |
| 8 | |
| 9 | Expert blueprint for Battle Royale games with zone mechanics, large-scale networking, and survival gameplay. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### Networking & Scale |
| 14 | - NEVER sync all 100 players every frame; strictly use a **Relevancy System** to sync high-freq data only for players within ~100m. Far players sync at ~5Hz. |
| 15 | - NEVER use `TRANSFER_MODE_RELIABLE` for movement data; strictly use **Unreliable** to prevent packet backup and network congestion. |
| 16 | - NEVER focus on client-side hit detection; strictly use **Authoritative Server Validation** where the server confirms "Did it hit?" based on state history. |
| 17 | - NEVER trust the client for game state; strictly validate all movement, looting, and inventory changes exclusively on the authoritative server. |
| 18 | - NEVER run a dedicated server with visuals; strictly use **Headless Mode** (`--headless`) or dummy drivers to save massive CPU/GPU resources. |
| 19 | - NEVER call RPCs before connection; strictly wait for the `connected_to_server` signal before attempting synchronization logic. |
| 20 | |
| 21 | ### Mechanics & Performance |
| 22 | - NEVER pick a fully random center for the Safe Zone; strictly target centers that ensure the new circle is **completely contained** within the current one. |
| 23 | - NEVER allow "Storm Tunneling"; strictly use a **Distance-to-Center** calculation rather than a simple collision perimeter to prevent skips at low tick rates. |
| 24 | - NEVER spawn loot without **Object Pooling**; strictly pre-instantiate and toggle visibility/collision to avoid GC spikes during dense spawns. |
| 25 | - NEVER ignore `VisibilityNotifier3D`; strictly disable `AnimationPlayer`, `_process()`, and heavy AI logic for players that are not visible to the observer. |
| 26 | - NEVER print in tight server loops; strictly avoid `print()` as console I/O is blocking and will tank server performance in high-player-count matches. |
| 27 | --- |
| 28 | |
| 29 | ## Available Scripts |
| 30 | |
| 31 | > **MANDATORY**: Read the appropriate script before implementing the corresponding pattern. |
| 32 | |
| 33 | ### Networking & Multiplayer |
| 34 | ### [kill_feed_bus.gd](scripts/kill_feed_bus.gd) |
| 35 | Global elimination signal bus with match stat tracking. |
| 36 | |
| 37 | ### [headless_branch_logic.gd](scripts/headless_branch_logic.gd) |
| 38 | Expert dedicated server initialization that branches logic based on `headless` execution and server-specific feature flags. |
| 39 | |
| 40 | ### [enet_br_server.gd](scripts/enet_br_server.gd) |
| 41 | High-player-capacity ENet server setup optimized for 100+ concurrent peers over UDP. |
| 42 | |
| 43 | ### [state_replication_unreliable.gd](scripts/state_replication_unreliable.gd) |
| 44 | Pattern for synchronizing player transforms via `TRANSFER_MODE_UNRELIABLE` to minimize network congestion in large matches. |
| 45 | |
| 46 | ### [authoritative_looting.gd](scripts/authoritative_looting.gd) |
| 47 | Authoritative server-side validation logic for preventing cheat-based item collection and infinite looting. |
| 48 | |
| 49 | ### [targeted_rpc_relay.gd](scripts/targeted_rpc_relay.gd) |
| 50 | Optimized communication pattern using `rpc_id()` to target specific peers and reduce wasted packet broadcasts. |
| 51 | |
| 52 | ### [server_state_buffer.gd](scripts/server_state_buffer.gd) |
| 53 | Handling network jitter and out-of-order UDP packets via sequential state buffering and tick-based sorting. |
| 54 | |
| 55 | ### Performance & Optimization |
| 56 | ### [rid_loot_spawner.gd](scripts/rid_loot_spawner.gd) |
| 57 | Bypassing the node hierarchy for massive loot density. Uses `RenderingServer` directly to eliminate CPU overhead for item drops. |
| 58 | |
| 59 | ### [async_map_loader.gd](scripts/async_map_loader.gd) |
| 60 | Non-blocking map sector streaming using `ResourceLoader` background threads for seamless open-world exploration. |
| 61 | |
| 62 | ### [multimesh_vegetation.gd](scripts/multimesh_vegetation.gd) |
| 63 | Drawing dense foliage and environment assets (100k+ instances) via `MultiMeshInstance3D` to maximize rendering performance. |
| 64 | |
| 65 | ### [threaded_ai_manager.gd](scripts/threaded_ai_manager.gd) |
| 66 | Offloading server-side bot behavior and pathfinding logic to the `WorkerThreadPool` to prevent main-thread stalling. |
| 67 | |
| 68 | ## NEVER Do in Battle Royale |
| 69 | |
| 70 | - **NEVER export mobile clients without the INTERNET p |