gameplay-design
Skill1 starsChanged 9 months agoApache-2.0View on GitHub
Game design theory and gameplay mechanics. MDA framework, balance formulas, combat systems, progression curves, input buffering, feedback loops. Code-first with BAD/GOOD pairs.
In this repository73 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- api-testingSkill
- asset-optimizationSkill
- audio-systemsSkill
- aws-essentialsSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- code-reviewerSkill
- container-securitySkill
- cost-optimizationSkill
- database-designSkill
- data-visualizationSkill
- doc-generationSkill
- docker-kubernetesSkill
- docxSkill
- email-notificationsSkill
- env-configSkill
- flutter-mobileSkill
- framer-motionSkill
- frontend-code-reviewSkill
- frontend-designSkill
- fullstack-developerSkill
- game-enginesSkill
- game-programming-languagesSkill
- game-serversSkill
- git-workflowSkill
- godot-4Skill
- golang-proSkill
- go-linter-configurationSkill
- graphics-renderingSkill
- i18n-localizationSkill
- incident-responseSkill
- level-designSkill
- llm-integrationSkill
- local-securitySkill
- memory-managementSkill
- monetization-systemsSkill
- monitoring-observabilitySkill
- multiplayer-netcodeSkill
- nextjs-16Skill
- notebooklm-researchSkill
- npm-packageSkill
- oauth-authSkill
- particle-systemsSkill
- performance-optimizationSkill
- playwright-testingSkill
- postgres-advancedSkill
- programming-architectureSkill
- project-migrationSkill
- publishing-platformsSkill
- python-best-practicesSkill
- react-nativeSkill
- redis-patternsSkill
- refactoring-patternsSkill
- remotion-best-practicesSkill
- rust-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Every game has a core loop.
- Distinctive: line 74
Keep sinks >= 60% of sources to prevent inflation:
- Distinctive: line 231
Pacing flat?: No tension/release cycle. Alternate difficulty spikes with rest.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are a game designer and mechanics programmer. Design systems that are fun, balanced, and implementable. Use the MDA framework. Always provide concrete code alongside theory.
When to Use
- Designing core loops, progression, or combat systems
- Balancing damage formulas, XP curves, or economy
- Implementing input buffering, feedback loops, or state machines
- Diagnosing why a game "doesn't feel fun"
MDA Framework
Mechanics (rules) produce Dynamics (behavior) which create Aesthetics (feelings).
Design backwards: pick the feeling first, then design dynamics that produce it, then build mechanics that enable those dynamics.
Aesthetic: Tension
Dynamic: Resource scarcity under time pressure
Mechanic: Ammo drops decrease as timer counts downCore Loop Design
Every game has a core loop. Map it before coding anything.
[Action] → [Reward] → [Investment] → [Action]
Shoot → XP/Loot → Upgrade → Harder enemiesBAD - Loop with no investment:
Kill enemy → Get gold → Kill enemy → Get gold (no progression)GOOD - Loop with meaningful investment:
Kill enemy → Get XP → Level up (new ability) → Fight harder enemy with new toolsBalance Formulas
Damage Calculation
// BAD - flat subtraction breaks at extremes
float damage = attack - defense; // Goes negative, or one-shots
// GOOD - diminishing returns, always positive
float reduction = defense / (defense + 100f);
float damage = attack * (1f - reduction);
// defense=50 → 33% reduction, defense=200 → 67% reductionXP Curves
// BAD - linear (boring, no sense of progress)
int xpRequired = level * 100;
// GOOD - polynomial (each level feels harder)
int xpRequired = (int)(100 * Mathf.Pow(level, 1.5f));
// Level 1: 100, Level 5: 1118, Level 10: 3162, Level 50: 35355Economy Sink Ratio
Keep sinks >= 60% of sources to prevent inflation:
Gold sources: quest rewards, drops, selling
Gold sinks: repairs, consumables, upgrades, auction tax
Track: daily_sinks / daily_sources >= 0.6Combat State Machine
public enum CombatState { Idle, Windup, Active, Recovery, Stunned }
public class CombatController : MonoBehaviour
{
private CombatState _state = CombatState.Idle;
private float _stateTimer;
// BAD - checking input everywhere
// if (Input.GetButton("Attack")) Attack(); // anywhere, anytime
// GOOD - state gates all actions
public void RequestAttack(AttackData attack)
{
if (_state != CombatState.Idle) return;
_state = CombatState.Windup;
_stateTimer = attack.windupTime;
// Windup → Active → Recovery → Idle
}
void Update()
{
_stateTimer -= Time.deltaTime;
if (_stateTimer > 0) return;
_state = _state switch
{
CombatState.Windup => CombatState.Active,
CombatState.Active => CombatState.Recovery,
CombatState.Recovery => CombatState.Idle,
CombatState.Stunned => CombatState.Idle,
_ => _state
};
}
}Input Buffering
Buffer inputs during recovery to prevent "swallowed" attacks:
public class InputBuffer
{
private readonly Queue<InputAction> _buffer = new();
private readonly float _bufferWindow = 0.15f; // 150ms
private float _bufferTimer;
public void BufferInput(InputAction action)
{
_buffer.Enqueue(action);
_bufferTimer = _bufferWindow;
}
public InputAction? ConsumeBuffer()
{
if (_buffer.Count == 0 || _bufferTimer <= 0) return null;
return _buffer.Dequeue();
}
public void Tick(float dt)
{
_bufferTimer -= dt;
if (_bufferTimer <= 0) _buffer.Clear();
}
}Feel parameters (tweak these first when movement feels wrong):
| Parameter | Platformer | Action RPG | FPS |
| Input buffer | 100-150ms | 150-200ms | 50-100ms |
| Coyote time | 80-120ms | n/a | n/a |
| Attack windup | 50-100ms | 100-300ms | 0-50ms |
Feedback Loops
Immediate (0-500ms)
Screen shake, hit flash, particles, sound. Missing any of these makes combat feel "floaty."
// BAD - damage with no feedback
target.TakeDamage(damage);
// GOOD - damage with layered feedback
target.TakeDamage(damage);
CameraShake.Trigger(0.1f, 0.3f);
target.FlashWhite(0.05f);
HitStop.Freeze(0.03f);
SpawnParticles(hitPoint, hitNormal);
AudioManager.Play("hit_impact", hitPoint);Short-term (1-30 seconds)
Combo counters, score multipliers, resource generation.
Long-term (minutes to hours)
Level ups, unlocks, story progression, map reveals.
Progression System
public class ProgressionManager
{
private readonly Dictionary<string, int> _stats = new();
private int _level = 1;
private int _xp;
public void AddXP(int amount)
{
_xp += amount;
while (_xp >= XPForLevel(_level + 1))
{
_xp -= XPForLevel(_level + 1);
_level++;
OnLevelUp(_level);
}
}
private int XPForLevel(int level) => (int)(100 * Mathf.Pow(level, 1.5f));
private void OnLevelUp(int level)
{
// Grant stat points, unlock abilities at milestones
int statPoints = level % 5 == 0 ? 3 : 1; // Bonus every 5 levels
_stats["unspent"] = _stats.GetValueOrDefault("unspent") + statPoints;
}
}Reward Loop Design
Map rewards to effort and time investment:
| Reward Type | Frequency | Example |
| Micro | Every 5-10s | Gold drop, hit feedback |
| Minor | Every 1-5min | Quest complete, item drop |
| Major | Every 15-30min | Level up, boss kill, new area |
| Milestone | Every 1-2hrs | Story beat, rare unlock |
Diagnostic: Game Doesn't Feel Fun
- No agency? Player choices don't matter. Add meaningful decisions.
- No feedback? Actions feel weightless. Add screen shake, particles, sound.
- No progression? Nothing changes. Add unlocks, difficulty scaling.
- Unfair deaths? Player can't learn. Add tells, coyote time, input buffering.
- Pacing flat? No tension/release cycle. Alternate difficulty spikes with rest.
- Economy broken? Inflation or scarcity. Check sink/source ratio.
Event-Driven Architecture
Decouple systems through events:
// BAD - tight coupling
public class Enemy
{
void Die()
{
player.AddXP(50); // Enemy knows about player
ui.ShowKillFeed(); // Enemy knows about UI
questManager.OnKill(); // Enemy knows about quests
}
}
// GOOD - event-driven
public static class GameEvents
{
public static event Action<EnemyType, Vector3> OnEnemyKilled;
public static void EnemyKilled(EnemyType type, Vector3 pos)
=> OnEnemyKilled?.Invoke(type, pos);
}
public class Enemy
{
void Die() => GameEvents.EnemyKilled(type, transform.position);
}
// XP, UI, Quests each subscribe independentlyDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

