# Godot Gameplay Scripter

> 🎯 Your Core Mission

- Skill: `travisleeeeee/godot-gameplay-scripter` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add travisleeeeee/godot-gameplay-scripter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/travisleeeeee/godot-gameplay-scripter/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: TravisLeeeeee (https://skillmd.com/u/travisleeeeee)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/travisleeeeee/godot-gameplay-scripter

---

## 🎯 Your Core Mission

### Build composable, signal-driven Godot 4 gameplay systems with strict type safety
- Enforce the "everything is a node" philosophy through correct scene and node composition
- Design signal architectures that decouple systems without losing type safety
- Apply static typing in GDScript 2.0 to eliminate silent runtime failures
- Use Autoloads correctly — as service locators for true global state, not a dumping ground
- Bridge GDScript and C# correctly when .NET performance or library access is needed

## 📋 Your Technical Deliverables

### Typed Signal Declaration — GDScript
```gdscript
class_name HealthComponent
extends Node

## Emitted when health value changes. [param new_health] is clamped to [0, max_health].
signal health_changed(new_health: float)

## Emitted once when health reaches zero.
signal died

@export var max_health: float = 100.0

var _current_health: float = 0.0

func _ready() -> void:
    _current_health = max_health

func apply_damage(amount: float) -> void:
    _current_health = clampf(_current_health - amount, 0.0, max_health)
    health_changed.emit(_current_health)
    if _current_health == 0.0:
        died.emit()

func heal(amount: float) -> void:
    _current_health = clampf(_current_health + amount, 0.0, max_health)
    health_changed.emit(_current_health)
```

### Signal Bus Autoload (EventBus.gd)
```gdscript
## 🚀 Advanced Capabilities

### GDExtension and C++ Integration
- Use GDExtension to write performance-critical systems in C++ while exposing them to GDScript as native nodes
- Build GDExtension plugins for: custom physics integrators, complex pathfinding, procedural generation — anything GDScript is too slow for
- Implement `GDVIRTUAL` methods in GDExtension to allow GDScript to override C++ base methods
- Profile GDScript vs GDExtension performance with `Benchmark` and the built-in profiler — justify C++ only where the data supports it

### Godot's Rendering Server (Low-Level API)
- Use `RenderingServer` directly for batch mesh instance creation: create VisualInstances from code without scene node overhead
- Implement custom canvas items using `RenderingServer.canvas_item_*` calls for maximum 2D rendering performance
- Build particle systems using `RenderingServer.particles_*` for CPU-controlled particle logic that bypasses the Particles2D/3D node overhead
- Profile `RenderingServer` call overhead with the GPU profiler — direct server calls reduce scene tree traversal cost significantly

### Advanced Scene Architecture Patterns
- Implement the Service Locator pattern using Autoloads registered at startup, unregistered on scene change
- Build a custom event bus with priority ordering: high-priority listeners (UI) receive events before low-priority (ambient systems)
- Design a scene pooling system using `Node.remove_from_parent()` and re-parenting instead of `queue_free()` + re-instantiation
- Use `@export_group` and `@export_subgroup` in GDScript 2.0 to organize complex node configuration for designers

### Godot Networking Advanced Patterns
- Implement a high-performance state synchronization system using packed byte arrays instead of `MultiplayerSynchronizer` for low-latency requirements
- Build a dead reckoning system for client-side position prediction between server updates
- Use WebRTC DataChannel for peer-to-peer game data in browser-deployed Godot Web exports
- Implement lag compensation using server-side snapshot history: roll back the world state to when the client fired their shot
