Logotipo de Implementing Gameplay Invariants

Implementing Gameplay Invariants

Comunidad
abagames
implementing-gameplay-invariants

Translates game design prose into engine-neutral implementation invariants and validation checks. Use when implementing or reviewing game mechanics where idle, hold-only, mashing, spam, safe waiting, or repeated scoring pulses must be prevented from dominating skilled play.

Descripción general

Editorabagames
Repositorioagentic-gamedev-skills
Nombre de la habilidadimplementing-gameplay-invariants
Estrellas
39
Forks
6
Archivos incluidos
1
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 1

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por abagames en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Implementing Gameplay Invariants en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/implementing-gameplay-invariants
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/abagames/agentic-gamedev-skills.git /tmp/agentic-gamedev-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-gamedev-skills/.agents/skills/implementing-gameplay-invariants .claude/skills/implementing-gameplay-invariants
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Implementing Gameplay Invariants en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Implementing Gameplay Invariants automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Implementing Gameplay Invariants no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Implementing Gameplay Invariants

Purpose

Turn design intent into concrete implementation constraints. This skill sits between game design and engine-specific coding: it converts statements such as "mashing should be worse than timed play" into invariants, implementation patterns, and validation checks that can be applied in any engine.

Use this skill even without designing-mini-games when a game spec contains risk/reward prose but does not say how the code will enforce it.

If the game has no design spec yet, start with designing-mini-games (it covers one-button and multi-input briefs).

When to Use

  • Implementing a game mechanic from a design spec or README.
  • Reviewing code against a design spec before running a balance test.
  • A checker or simulation shows mono_dominant, tied, or repeated-input dominance, and you already know which design promise needs a code-level invariant.
  • The design mentions idle weakness, hold-only weakness, mashing weakness, safe waiting, cooldowns, combos, scoring pulses, shields, charges, or invulnerability.
  • The implementation is engine-specific, but the failure mode is rule-level rather than API-level.

When Not to Use

  • Pure rendering, asset, UI, audio, build, or engine API work.
  • Numeric tuning after the rule-level invariants are already enforced.
  • Open-ended game design before the core rules and scoring events are known.
  • Choosing a balance-repair strategy from telemetry. Start with evaluating-gameplay-balance when a failure has occurred and you need to diagnose the cause or choose a balance pattern; use this skill after that when the chosen fix needs a new code-level invariant.

Required Inputs

  • The design spec or README.
  • The input policies that must be worse than skilled play: idle, hold-only, mashing, always-left/right, alternating spam, safe waiting, or equivalent.
  • The intended skilled pattern.
  • The scoring event, game-over condition, and any safety/power state.
  • Any deterministic validation seed or known initial random sequence used by the project checker.
  • Optional telemetry or checker output.

Procedure

  1. Extract each design promise that must be true in code:

    • "Idle is weak"
    • "Hold-only is weak"
    • "Mashing is weak"
    • "Score comes from timing"
    • "Shield is safe but costly"
    • "Landing / pulse / reflection rewards precision"
  2. Rewrite each promise as an invariant:

    • Use testable language: "A tap within 12 frames of the previous tap cannot score", not "mashing is bad".
    • Include the scope: per input, per target, per hazard, per landing, per combo, per second, or per resource unit.
    • Include the consequence: no score, cooldown, exposure, resource drain, combo reset, missed aim, or visible positional cost.
    • When a scoring object can persist across frames or inputs, define its lifecycle explicitly: spawn/start, active scoring window, scored/consumed state, expiry/removal, and whether a new lifecycle can score again.
    • For repeated pulse, reflection, AoE, shield, or release scoring, require per-opportunity identity in validation logs when possible (targetId, pulseId, or equivalent) so duplicate scoring is detectable.
  3. Run a policy-specific precheck before coding when the mechanic can be reasoned about from the spec:

    • For each bad policy, write whether it should die, time out safely, or survive with capped score.
    • If a bad policy can survive indefinitely, the invariant must cap or starve its score; death cannot be the weakness.
    • If random first hazards, gaps, spawns, or routes affect survivability, preview the project's deterministic validation seed and confirm the first 5-10 outcomes match the invariant assumptions.
  4. Choose an implementation pattern from references/invariant-patterns.md if needed.

  5. Check for scoring loopholes:

    • No raw score per input.
    • No reusable pulse that can score repeatedly without a new hazard/opportunity.
    • No survival scoring while the player is in a safe/low-skill state unless survival is the main mastery signal.
    • No permanent safety state with uncapped scoring.
    • No long-lived scored object that remains eligible for future score unless its lifecycle visibly resets.
    • No total-score-only validation for spam fixes; also compare score per unique opportunity or unique target when the mechanic can rescore the same object.
  6. Add or review the implementation:

    • Engine-specific code belongs in the engine skill or project code.
    • This skill defines what must be true, not the exact rendering or API calls.
  7. Validate:

    • Run available monotonous policies and exploratory/skilled policies.
    • Prefer invariant-specific probes before the full global ratio check: NoInput score/death, HoldOnly score/death, SpamPress scoring events, entity counts, resource drain, and score-per-opportunity caps.
    • For pulse/reflection/AoE fixes, log accepted/rejected inputs, pulse age or cooldown state, target/opportunity id, already-scored state, score delta, and max active entity count.
    • Define the probe's pass/fail bound before editing when possible, such as SpamPress score per unique target below a scripted skilled cycle, HoldOnly score capped below a stated rate, or max active entities below a fixed limit.
    • Confirm the known bad policy scores lower than skilled play.
    • If no simulator exists, write a short human-readable validation checklist and mark the gap.

Invariant Template

Use this compact form in specs, PR notes, or code reviews:

markdown
- Design promise: <prose from spec>
- Implementation invariant: <testable rule>
- Pattern: <pattern ID from references/invariant-patterns.md, e.g. cooldown, per-target-cap, resource-drain>
- Readout: <the persistent on-screen indicator that lets the player act on this rule — or why this rule changes no player decision>
- Precheck: <whether the bad policy dies, survives safely, or must be score-capped>
- Validation: <policy, telemetry, or seeded scenario that should fail if the invariant is broken>

Readout is not documentation of the rule; it is part of the rule. An invariant that changes what the player should do, and is not drawn, is indistinguishable from an unfair game — see "Invisible rule" below.

Common Failure Modes

  • Prose-only weakness: the README says mashing is bad, but the code gives every tap a scoring chance.
  • Reusable scoring pulse: a landing, shield, AoE, or reflection pulse can score many times from repeated input.
  • Safe scoring: the safest state also earns points or preserves a multiplier.
  • Hidden tester patch: code special-cases a bad policy instead of creating visible game rules.
  • Numeric-only fix: spawn rates or score values are changed without enforcing the missing invariant.
  • Unbounded entities: scoring or hazard objects live too long, causing slow validation and spam score loops.
  • Seed-specific surprise: the validation seed creates early hazards/gaps that violate design assumptions, and the issue is found only after a full GA run.
  • Invariant conflict: the design requires mutually exclusive invariants (e.g., "idle must die" and "survival is the only scoring"). If resolving the conflict requires changing the Core Experience or discarding the tag relationship, report that the design is unsalvageable and recommend a Failure Report.
  • Invisible rule: the invariant is implemented correctly, passes every value assertion, and is never drawn on screen. This is the hardest class to catch and empirically one of the most common — in one measured project, four of nine shipped-and-fixed bugs were this same defect (the controls, an overload trigger, and a clear condition were each perfectly correct in the simulation and invisible to the player). Value assertions cannot detect it by construction: the simulation is right. Only a readout requirement plus a screenshot can.

Validation

A change is valid when:

  • Each design promise has at least one implementation invariant.
  • Each monotonous policy has a visible cost or score cap.
  • Any indefinitely surviving monotonous policy has a scoring cap or score starvation rule.
  • Every invariant that changes a player decision has a persistent readout, and that readout fills before the situation is bad rather than firing a warning once it already is. A gauge that tracks crowding toward a cap teaches the player to act; an alarm at the moment of overload only narrates a loss. Add the readout in the same change as the rule, and screenshot it.
  • Seeded early-game random sequences have been checked when random initial hazards or gaps determine survivability.
  • Skilled play has a causal route to higher score or longer meaningful survival.
  • The implementation can be tested by policy comparison, telemetry, or a concrete manual checklist.

If validation is impossible, report that the invariant is specified but unverified.

References

  • references/invariant-patterns.md — reusable patterns for mashing, hold-only, idle, safe waiting, pulse scoring, combos, and resource states.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Implementing Gameplay Invariants?

Translates game design prose into engine-neutral implementation invariants and validation checks. Use when implementing or reviewing game mechanics where idle, hold-only, mashing, spam, safe waiting, or repeated scoring pulses must be prevented from dominating skilled play.

¿Por qué usar Implementing Gameplay Invariants en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Implementing Gameplay Invariants está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Implementing Gameplay Invariants en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/implementing-gameplay-invariants. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Implementing Gameplay Invariants?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Implementing Gameplay Invariants?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Implementing Gameplay Invariants con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Implementing Gameplay Invariants?

Sí. abagames la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇