### Workflow 1: Starting a New Game Project Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Follow these steps to initiate a new game project from scratch, covering ideation, engine setup, and design documentation. ```bash 1. /start (routes you based on where you are) 2. /brainstorm (collaborative ideation, pick a concept) 3. /setup-engine (pin engine and version) 4. /design-review on concept doc (optional, recommended) 5. /map-systems (decompose concept into systems with deps and priorities) 6. /gate-check concept (verify you're ready for Systems Design) 7. /design-system per system (guided GDD authoring) ``` -------------------------------- ### Start NetworkManager Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/networking.md Demonstrates how to start the NetworkManager as a host, dedicated server, or client. Attach the NetworkManager component to a GameObject in your scene or create a custom script. ```csharp using Unity.Netcode; public class CustomNetworkManager : MonoBehaviour { void Start() { NetworkManager.Singleton.StartHost(); // Server + client // OR NetworkManager.Singleton.StartServer(); // Dedicated server // OR NetworkManager.Singleton.StartClient(); // Client only } } ``` -------------------------------- ### Basic Forest Generation Node Setup Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/plugins/pcg.md This node setup defines a basic workflow for generating a forest. It starts with sampling the volume, filtering density, and then spawning static meshes. ```plaintext Input (Volume) ↓ Surface Sampler (sample volume surface, points per m²: 0.5) ↓ Density Filter (use texture mask or noise) ↓ Static Mesh Spawner (tree meshes) ↓ Output ``` -------------------------------- ### Start a New Claude Code Session Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Run the /start command to initiate a new Claude Code session. This command guides you through onboarding and directs you to the appropriate development phase based on your project's status. ```bash /start ``` -------------------------------- ### Clone Project and Navigate Source: https://github.com/donchitos/claude-code-game-studios/blob/main/README.md Clone the project repository and navigate into the project directory. This is the initial step to start using the template. ```bash git clone https://github.com/Donchitos/Claude-Code-Game-Studios.git my-game cd my-game ``` -------------------------------- ### Start Next System Design Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Picks the highest-priority undesigned system and initiates its GDD creation process. ```bash /map-systems next ``` -------------------------------- ### Workflow 2: Starting Coding from Designs Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md This workflow guides you through the process of translating game designs into code, including architecture and story creation. ```bash 1. /design-review on each GDD (make sure they're solid) 2. /review-all-gdds (cross-GDD consistency) 3. /gate-check systems-design 4. /create-architecture + /architecture-decision (per major decision) 5. /architecture-review 6. /create-control-manifest 7. /gate-check technical-setup 8. /create-epics layer: foundation + /create-stories [slug] (define epics, break into stories) 9. /sprint-plan new 10. /story-readiness -> implement -> /story-done (story lifecycle) ``` -------------------------------- ### Setup Game Engine Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Configures the development environment by setting up the game engine. You can specify a particular engine version. ```bash /setup-engine ``` ```bash /setup-engine godot 4.6 ``` -------------------------------- ### Clone Project and Navigate Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Use Git to clone the repository and change into the project directory. This is the initial step to start working on the game project. ```bash git clone my-game cd my-game ``` -------------------------------- ### Unity Occlusion Culling Setup Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/rendering.md Instructions for baking occlusion culling data for static geometry in Unity. ```csharp // Window > Rendering > Occlusion Culling // Bake occlusion data for static geometry ``` -------------------------------- ### Open-Ended Question with Context Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Shows how to ask an open-ended question while providing necessary context and potential options. ```markdown "The design doc doesn't specify what happens when a player dies while crafting. Some options: - Materials lost (harsh, risk/reward) - Materials returned to inventory (forgiving) - Work-in-progress saved (complex to implement) What fits your target difficulty?" ``` -------------------------------- ### Unity 6+ Baked Lighting Setup Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/rendering.md Steps for configuring and baking lighting using the Unity 6 Progressive Lightmapper. ```csharp // Mark objects as static: Inspector > Static > Contribute GI // Bake: Window > Rendering > Lighting > Generate Lighting ``` -------------------------------- ### Constrained Options with Trade-offs Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Illustrates presenting constrained options with clear trade-offs, aiding in strategic decisions. ```markdown "Inventory system options: 1. Grid-based (Resident Evil, Diablo): Deep space management, slower 2. List-based (Skyrim, Fallout): Fast access, less strategic 3. Hybrid (weight limit + limited slots): Medium complexity Given your 'Meaningful Choices' pillar, I'd lean toward #1 or #3. Thoughts?" ``` -------------------------------- ### Perform Technical Setup Gate Check Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Checks if the technical setup requirements for Phase 3 are met. This includes the existence of the master architecture document, a minimum of 3 accepted ADRs, the architecture review report, the control manifest, and the accessibility requirements document. ```bash /gate-check technical-setup ``` -------------------------------- ### AskUserQuestion Tool - Design Decision Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Illustrates using the AskUserQuestion tool for a specific design decision after providing full analysis in conversation. ```yaml AskUserQuestion: questions: - question: "Which crafting approach fits your vision?" header: "Approach" options: - label: "Hybrid Discovery (Recommended)" description: "Discovery base with earned hints — balances exploration and accessibility" - label: "Full Discovery" description: "Pure experimentation — maximum mystery, risk of frustration" - label: "Hint System" description: "Progressive hints reveal recipes — accessible but less surprise" ``` -------------------------------- ### Workflow 6: Starting a New Sprint Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Manage the beginning of a new sprint, including retrospective, planning, and story readiness checks. ```bash 1. /retrospective (review last sprint) 2. /sprint-plan new (create next sprint) 3. /scope-check (ensure scope is manageable) 4. /story-readiness per story before pickup 5. Implement stories 6. /story-done per completed story 7. /sprint-status for quick progress checks ``` -------------------------------- ### Perform Performance Profiling Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Guide through structured performance profiling to establish targets, identify bottlenecks, and generate optimization tasks with expected gains. ```bash /perf-profile ``` -------------------------------- ### Input Action Event Callbacks Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/input.md Demonstrates subscribing to input action events like 'started', 'performed', and 'canceled' for event-driven input handling. ```csharp // started: Input began (e.g., trigger pressed slightly) controls.Gameplay.Fire.started += ctx => Debug.Log("Fire started"); // performed: Input action triggered (e.g., button fully pressed) controls.Gameplay.Fire.performed += ctx => Debug.Log("Fire performed"); // canceled: Input released or interrupted controls.Gameplay.Fire.canceled += ctx => Debug.Log("Fire canceled"); ``` -------------------------------- ### CommonUI Widget Examples Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/modules/ui.md Overview of essential CommonUI widgets for building user interfaces, including base classes for screens, buttons, and text elements. ```cpp // CommonUI widgets: // - CommonActivatableWidget: Base for screens/menus // - CommonButtonBase: Input-aware button (gamepad + mouse) // - CommonTextBlock: Text with styling ``` -------------------------------- ### Expected Session Start Hook Output Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md This is an example of the output you should see from the session-start.sh hook when starting a new Claude Code session, indicating that hooks are functioning correctly. ```bash === Claude Code Game Studios -- Session Context === Branch: main Recent commits: abc1234 Initial commit =================================== ``` -------------------------------- ### Start Brainstorming Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Initiates the game concept brainstorming process. You can provide a genre hint to guide the ideation. ```bash /brainstorm ``` ```bash /brainstorm roguelike deckbuilder ``` -------------------------------- ### Basic UGUI Setup in Unity Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/ui.md Outlines the initial steps for setting up a legacy UGUI Canvas in Unity. It lists common UI elements that can be added to the Canvas. ```csharp // GameObject > UI > Canvas (creates Canvas, EventSystem) // UI Elements: // - Text (use TextMeshPro instead) // - Button // - Image // - Slider // - Toggle // - InputField ``` -------------------------------- ### URP Renderer Feature Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/rendering.md A C# example demonstrating how to create and enqueue a custom render pass using a ScriptableRendererFeature in URP. ```csharp using UnityEngine.Rendering.Universal; public class OutlineRendererFeature : ScriptableRendererFeature { OutlineRenderPass pass; public override void Create() { pass = new OutlineRenderPass(); } public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData data) { renderer.EnqueuePass(pass); } } ``` -------------------------------- ### Host and Join Game with ENetMultiplayerPeer Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/godot/modules/networking.md Demonstrates how to set up a server to host a game and how a client can join it using ENetMultiplayerPeer. ```gdscript # Server func host_game(port: int = 9999) -> void: var peer := ENetMultiplayerPeer.new() peer.create_server(port) multiplayer.multiplayer_peer = peer multiplayer.peer_connected.connect(_on_peer_connected) multiplayer.peer_disconnected.connect(_on_peer_disconnected) # Client func join_game(address: String, port: int = 9999) -> void: var peer := ENetMultiplayerPeer.new() peer.create_client(address, port) multiplayer.multiplayer_peer = peer ``` -------------------------------- ### USS Flexbox Layout Examples Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/ui.md Provides USS examples for common Flexbox layouts: horizontal, vertical, centering children, and distributing space between elements. ```css /* Horizontal layout */ .horizontal { flex-direction: row; } /* Vertical layout (default) */ .vertical { flex-direction: column; } /* Center children */ .centered { align-items: center; justify-content: center; } /* Spacing */ .spaced { justify-content: space-between; } ``` -------------------------------- ### Display Help Information Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Use the /help command to get assistance at any stage of the development process. It provides context-aware guidance based on the current phase and existing project artifacts. ```bash /help ``` -------------------------------- ### Substrate Material System: Old vs. New Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/breaking-changes.md Illustrates the shift from legacy material nodes to the new modular Substrate material system. Use Substrate for new projects and rebuild existing materials. ```cpp // ❌ OLD: Legacy material nodes (still work but deprecated) // Standard material graph with Base Color, Metallic, Roughness, etc. // ✅ NEW: Substrate material layers // Use Substrate nodes: Substrate Slab, Substrate Blend, etc. // Modular material authoring with true physical accuracy ``` -------------------------------- ### Get Input Direction Vector Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/godot/modules/input.md Use Input.get_vector to get a normalized direction based on four input actions. This is commonly used for movement in physics processing. ```gdscript func _physics_process(delta: float) -> void: var input_dir: Vector2 = Input.get_vector( &"move_left", &"move_right", &"move_forward", &"move_back" ) if Input.is_action_just_pressed(&"jump"): jump() ``` -------------------------------- ### PCG API Migration Example (UE 5.6 to 5.7) Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/plugins/pcg.md Illustrates the difference between the old experimental API in UE 5.6 and the new stable production API in UE 5.7 for PCG nodes. ```cpp // ❌ OLD (5.6 experimental API): // Some nodes renamed, API unstable // ✅ NEW (5.7 production API): // Stable node types, documented API ``` -------------------------------- ### Spline-Based Road with Trees Graph Setup Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/plugins/pcg.md This graph setup illustrates generating content along a spline, specifically for creating a road with trees offset from the path. ```plaintext Spline Input ↓ Spline Sampler (sample along spline) ↓ Offset (offset from spline path) ↓ Tree Spawner ↓ Output ``` -------------------------------- ### Mixed Forest Biome Graph Setup Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/plugins/pcg.md This graph setup demonstrates how to create a mixed forest biome using density filtering to differentiate between tree and rock spawning areas. ```plaintext Input (Landscape) ↓ Surface Sampler (density: 1.0) ↓ ┌─────────────────┬─────────────────┐ │ Tree Biome │ Rock Biome │ │ (density > 0.5) │ (density < 0.5) │ ├─────────────────┼─────────────────┤ │ Tree Spawner │ Rock Spawner │ └─────────────────┴─────────────────┘ ↓ Merge ↓ Output ``` -------------------------------- ### New Files to Add (v1.0.0-beta → v1.0) Source: https://github.com/donchitos/claude-code-game-studios/blob/main/UPGRADING.md Lists new files that should be added during the upgrade process. ```text .claude/skills/vertical-slice/SKILL.md CONTRIBUTING.md SECURITY.md ``` -------------------------------- ### Install Animation Rigging Package Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/animation.md Install the Animation Rigging package via the Package Manager. This package provides runtime IK, aim constraints, and procedural animation capabilities. ```csharp // Install: Package Manager > Animation Rigging // Runtime IK, aim constraints, procedural animation ``` -------------------------------- ### Setup Enhanced Input System in C++ Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/current-best-practices.md Configure the Enhanced Input system by setting up Input Actions and Mapping Contexts. This C++ code demonstrates how to bind actions and handle input events in a character class. ```cpp // 1. Create Input Action (IA_Jump) // 2. Create Input Mapping Context (IMC_Default) // 3. Add mapping: IA_Jump → Space Bar // C++ Setup: #include "EnhancedInputComponent.h" #include "EnhancedInputSubsystems.h" void AMyCharacter::BeginPlay() { Super::BeginPlay(); if (APlayerController* PC = Cast(GetController())) { if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem(PC->GetLocalPlayer())) { Subsystem->AddMappingContext(DefaultMappingContext, 0); } } } void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { UEnhancedInputComponent* EIC = Cast(PlayerInputComponent); EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump); EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move); } void AMyCharacter::Move(const FInputActionValue& Value) { FVector2D MoveVector = Value.Get(); AddMovementInput(GetActorForwardVector(), MoveVector.Y); AddMovementInput(GetActorRightVector(), MoveVector.X); } ``` -------------------------------- ### Gameplay Ability System (GAS) Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/current-best-practices.md Utilize the Gameplay Ability System (GAS) for complex gameplay mechanics like abilities, buffs, and damage calculation. This example shows a basic structure for a Fireball ability. ```cpp // ✅ Use GAS for: Abilities, buffs, damage calculation, cooldowns // Modular, scalable, multiplayer-ready // Install: Enable "Gameplay Abilities" plugin // Example Ability: UCLASS() class UGA_Fireball : public UGameplayAbility { GENERATED_BODY() public: virtual void ActivateAbility(...) override { // Ability logic SpawnFireball(); CommitAbility(); // Commit cost/cooldown } }; ``` -------------------------------- ### Leading Question Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Demonstrates a leading question that makes an assumption instead of asking for input. ```markdown "I'll make combat real-time since that's standard for this genre." ← Didn't ask, just assumed ``` -------------------------------- ### New Files to Add (v0.4.x → v1.0) Source: https://github.com/donchitos/claude-code-game-studios/blob/main/UPGRADING.md Lists new files that should be added during the upgrade process. ```text .claude/agents/godot-csharp-specialist.md .claude/docs/director-gates.md ``` -------------------------------- ### Design Specific System GDD Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Directly starts the GDD authoring process for a specified system. ```bash /design-system combat-system ``` -------------------------------- ### Workflow 5: Adopting the System for Existing Projects Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Integrate this workflow system into an existing project, including auditing and migration planning. ```bash 1. /start (choose Path D -- existing work) 2. /project-stage-detect (determines current phase) 3. /adopt (audits existing artifacts, builds migration plan) 4. /design-system retrofit [path] (fill GDD gaps) 5. /architecture-decision retrofit [path] (fill ADR gaps) 6. /gate-check at appropriate transition ``` -------------------------------- ### Too Open-Ended Question Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Highlights a bad practice of asking overly broad questions without guidance. ```markdown "What should the combat system be like?" ← Too broad, user doesn't know where to start ``` -------------------------------- ### Multiple Choice Question Example Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/COLLABORATIVE-DESIGN-PRINCIPLE.md Presents a multiple-choice question with reasoning for each option, suitable for design discussions. ```markdown "Should enemies telegraph attacks? A) Yes, 0.5s before (accessible, rhythm-based) B) Yes, 0.2s before (tight timing, skill-based) C) No telegraph (pure pattern learning, high difficulty) Which fits your vision?" ``` -------------------------------- ### Workflow 7: Shipping the Game Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/WORKFLOW-GUIDE.md Comprehensive steps for releasing a game, from final checks and localization to launch coordination and post-launch support. ```bash 1. /gate-check polish (verify Polish phase is complete) 2. /tech-debt (decide what's acceptable at launch) 3. /localize (final localization pass) 4. /release-checklist v1.0.0 5. /launch-checklist (full cross-department validation) 6. /team-release (coordinate the release) 7. /patch-notes and /changelog 8. Ship! 9. /hotfix if anything breaks post-launch 10. Post-mortem after launch stabilizes ``` -------------------------------- ### UGUI Scripting Example in C# Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/ui.md Demonstrates how to interact with UGUI elements in C#. It shows how to update TextMeshProUGUI, add listeners to Button clicks, and handle Slider value changes. ```csharp using UnityEngine; using UnityEngine.UI; using TMPro; // TextMeshPro public class LegacyUI : MonoBehaviour { public TextMeshProUGUI scoreText; public Button playButton; public Slider volumeSlider; void Start() { // Update text scoreText.text = "Score: 100"; // Button click playButton.onClick.AddListener(OnPlayClicked); // Slider value changed volumeSlider.onValueChanged.AddListener(OnVolumeChanged); } void OnPlayClicked() { Debug.Log("Play clicked"); } void OnVolumeChanged(float value) { AudioListener.volume = value; } } ``` -------------------------------- ### Enhanced Input System: Legacy vs. New Binding Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/breaking-changes.md Demonstrates the migration from legacy input bindings to the Enhanced Input system, which is now the default. Replace legacy bindings with Enhanced Input actions. ```cpp // ❌ OLD: Legacy input bindings (deprecated) InputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump); // ✅ NEW: Enhanced Input SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { UEnhancedInputComponent* EIC = Cast(PlayerInputComponent); EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump); } ``` -------------------------------- ### Enable Substrate Material System Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unreal/modules/rendering.md Activate the Substrate material system in project settings. A restart of the editor is required after enabling. ```cpp // Project Settings > Engine > Substrate > Enable Substrate // Restart editor ``` -------------------------------- ### GPU Instancing with Graphics.RenderMeshInstanced Source: https://github.com/donchitos/claude-code-game-studios/blob/main/docs/engine-reference/unity/modules/rendering.md Example of using Graphics.RenderMeshInstanced for GPU instancing, which batches identical meshes with the same material and mesh. ```csharp // Material: Enable "Enable GPU Instancing" checkbox // Batches identical meshes (same material + mesh) Graphics.RenderMeshInstanced( new RenderParams(material), mesh, 0, matrices // NativeArray ); ```