gameplay-mechanic

Implements Unity gameplay mechanics from design docs through code, scene assembly, and verification.

Updated Apr 27, 2024
One-click install
npx skills add https://github.com/IgorGribowsky/rts-sandbox --skill gameplay-mechanic-igorgribowsky
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gameplay-mechanic
Source: https://github.com/IgorGribowsky/rts-sandbox/tree/main/rts-sandbox-src/.claude/skills/gameplay-mechanic
Command: npx skills add https://github.com/IgorGribowsky/rts-sandbox --skill gameplay-mechanic-igorgribowsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Implementing a gameplay mechanic in Unity involves many failure points: unconfirmed design intent, magic numbers scattered across prefabs, broken compilation discovered too late, and silent asset corruption. This Skill enforces a disciplined workflow that takes a mechanic from its design document to a verified, review-ready implementation. ## Core Features & Use Cases - Doc-driven implementation: Reads the mechanic's design document first, blocks work on unconfirmed (status: proposed) specs, and pulls tuning numbers from the doc instead of inventing them silently. - Code architecture conventions: Enforces single-responsibility components, ScriptableObject balance configs, Input System abstraction, object pooling, and correct Update/FixedUpdate separation. - Cheap verification loop: Validates compilation per-script before full builds, checks the console for errors, and confirms prefab field values and pool cleanup by reading actual state rather than trusting code. - Placeholder and handoff handling: Ships honest placeholder primitives with TODO markers and handoff files when art or audio assets are missing, so tasks can still close. - Use Case: You receive a design doc for a shooting mechanic. The Skill guides you to write the shooter component, wire it into prefabs via editor tooling, verify compilation and console cleanliness, then hand the user a concrete playtest script for acceptance. ## Quick Start Implement the shooting mechanic described in its design doc, following the gameplay-mechanic workflow, and report what to playtest.

Frequently Asked Questions about gameplay-mechanic

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

FAQPage Schema
How do I implement a Unity gameplay mechanic from a design document?▼

Read the design doc fully first and confirm its status is not 'proposed'. Write the C# component scripts, verify compilation, then wire prefabs and scenes using editor tooling. Finish by verifying actual field values and handing the user a concrete playtest script.

Where should balance numbers live in a Unity project?▼

Balance numbers belong in a ScriptableObject config asset, not in field initializers on prefabs. This makes tuning a single-file edit that a non-programmer can open and adjust directly.

Should Unity gameplay code use Update or FixedUpdate?▼

Per-frame logic goes in Update, while physics and forces go in FixedUpdate. Multiply movement by deltaTime so behavior does not depend on frame rate.

What should I do when a Unity mechanic needs art assets that do not exist yet?▼

Use an obvious placeholder such as a red capsule or white square, mark it with a TODO comment referencing a handoff file, and describe what asset is needed and where it goes. The task can still pass acceptance with the placeholder.

Why avoid GameObject.Find in Unity gameplay scripts?▼

GameObject.Find and string-based lookups are slow and fragile, breaking silently when objects are renamed. Assign references through serialized fields set in the prefab instead.