unity-game-loop

Generate Unity game loop architectures with ScriptableObject-driven phase and difficulty configuration.

24|5|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Nice-Wolf-Studio/unity-claude-skills --skill unity-game-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-game-loop
Source: https://github.com/Nice-Wolf-Studio/unity-claude-skills/tree/main/skills/unity-game-loop
Command: npx skills add https://github.com/Nice-Wolf-Studio/unity-claude-skills --skill unity-game-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the common issue of AI-generated features lacking a cohesive game loop, resulting in isolated systems and no clear progression or session boundaries. It translates design intent into robust code architecture for core loops, session lifecycles, win/lose conditions, meta progression, difficulty tuning, and pacing.

Core Features & Use Cases

  • Core Loop Scaffolding: Enforces ordered phases (e.g., Explore, Collect, Craft, Survive) with extensible IGamePhase implementations.
  • Session Lifecycle Management: Manages distinct play sessions with explicit start/end events, enabling restarts without scene reloads.
  • Win/Lose Condition Architecture: Allows designers to define win/lose conditions using ScriptableObjects, evaluated by a ConditionEvaluator.
  • Meta Loop Hooks: Facilitates persistent progression (currency, unlocks) between sessions via a MetaProgressionService.
  • Tunable Difficulty System: Enables designers to tune difficulty parameters using AnimationCurves in DifficultyConfig.
  • Pacing & Encounter Timing: Manages game rhythm and intensity using a PacingDirector and PacingCurveConfig.
  • Use Case: A game designer wants to create a roguelike where each run has a clear start and end, escalating difficulty, and persistent unlocks between runs. This Skill provides the architectural patterns to implement these features robustly.

Quick Start

Implement a new game phase by creating a class that inherits from IGamePhase and configuring it in a GamePhaseConfig asset.

Frequently Asked Questions about unity-game-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a core game loop in Unity so my systems aren't isolated?

A Unity game loop is structured by enforcing ordered phases like Explore or Collect through extensible interface implementations. This architecture separates gameplay concerns, ensuring systems interact cohesively rather than functioning as isolated features.

How do I manage a play session lifecycle in Unity without reloading scenes?

Managing a play session lifecycle in Unity without scene reloads involves using explicit start and end events for distinct sessions. This pattern enables clean restarts and state resets dynamically, avoiding the performance cost of reloading scenes.

What is the best way to let designers tune difficulty curves in Unity?

The best way to let designers tune difficulty curves in Unity is by using ScriptableObjects configured with AnimationCurves. This allows designers to adjust difficulty parameters and pacing directly through the Inspector without modifying code.

Can I define win and lose conditions using ScriptableObjects in Unity?

Yes, you can define win and lose conditions using ScriptableObjects in Unity. A dedicated evaluator assesses these designer-driven assets, allowing you to establish clear victory or failure states without hardcoding logic into gameplay scripts.

How do I implement meta-progression for persistent unlocks between runs?

Implementing meta-progression for persistent unlocks between runs requires a service that handles hooks between sessions. This facilitates persistent data like currency and unlocks, ensuring player progression carries over across distinct play sessions.

Does this Unity game loop architecture support roguelike pacing and encounter timing?

Yes, this Unity game loop architecture supports roguelike pacing and encounter timing by using a dedicated director and curve configurations. This system manages game rhythm and intensity, effectively scaling encounter timing for escalating run difficulty.