Juice game feel

From nlelouche/Unity-SkillForge · View interactive version

Juice game feel is an AI agent skill from the GitHub repository nlelouche/Unity-SkillForge. Game feel and juice specialist for satisfying feedback, animations, and polish.

How to use this skill

Skill file

Juice & Game Feel

Overview

Game feel (juice) for satisfying player feedback. Combines visual, audio, and haptic responses to make gameplay feel impactful and responsive.

When to Use

Juice Pillars

┌─────────────────────────────────────────────────────────────┐
│                    GAME FEEL PILLARS                        │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐   │
│  │  VISUAL  │  │  AUDIO   │  │  HAPTIC  │  │  TIMING  │   │
│  ├──────────┤  ├──────────┤  ├──────────┤  ├──────────┤   │
│  │ Squash   │  │ SFX      │  │ Rumble   │  │ Hitstop  │   │
│  │ Stretch  │  │ Pitch    │  │ Vibrate  │  │ Slowdown │   │
│  │ Shake    │  │ Layers   │  │ Impulse  │  │ Anticipat│   │
│  │ Flash    │  │ Reverb   │  │          │  │ Follow-  │   │
│  │ Particles│  │ Ducking  │  │          │  │ through  │   │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Feedback Types

| Type | Elements | When |

|------|----------|------|

| Impact | Shake, flash, particles | Hit/damage |

| Success | Scale punch, SFX, glow | Pickup/complete |

| Fail | Shake, red flash, buzz | Error/damage |

| Anticipation | Wind-up, charge glow | Before action |

| Follow-through | Settle, trail, dust | After action |

Tweening Essentials (DOTween)

| Tween | Use |

|-------|-----|

| DOScale | Punch, pop effects |

| DOShakePosition | Screen/object shake |

| DOColor | Flash, fade |

| DOPunchScale | Elastic feedback |

| DOJump | Bouncy movement |

Best Practices

Few-Shot Examples

Example 1: Button Press

User: "Make button press feel satisfying."

Agent:

public void OnButtonPress()
{
    transform.DOPunchScale(Vector3.one * -0.1f, 0.15f, 5, 0.5f);
    _audioSource.PlayOneShot(_clickSound);
    // Optional: Haptic.Generate(HapticType.Light);
}

Example 2: Hit Impact

User: "Add juice to enemy hit."

Agent:

public void OnHit(float damage)
{
    // Visual
    _spriteRenderer.DOColor(Color.white, 0.05f)
        .SetLoops(2, LoopType.Yoyo);
    transform.DOShakePosition(0.1f, 0.2f, 20);
    
    // Particles
    _hitVFX.Play();
    
    // Audio
    _audioSource.pitch = Random.Range(0.9f, 1.1f);
    _audioSource.PlayOneShot(_hitSound);
    
    // Hitstop
    Time.timeScale = 0.1f;
    DOVirtual.DelayedCall(0.05f, () => Time.timeScale = 1f);
}

Example 3: Coin Pickup

User: "Satisfying coin collect."

Agent:

public void OnCollect()
{
    // Pop and fly to UI
    transform.DOScale(1.3f, 0.1f).SetEase(Ease.OutBack);
    transform.DOMove(_uiTarget.position, 0.5f)
        .SetEase(Ease.InBack)
        .OnComplete(() => {
            _coinCounter.DOPunchScale(Vector3.one * 0.2f, 0.2f);
            _collectSound.Play();
            Destroy(gameObject);
        });
}

Hitstop Implementation

public static async UniTask Hitstop(float duration = 0.05f)
{
    Time.timeScale = 0f;
    await UniTask.Delay(TimeSpan.FromSeconds(duration), true);
    Time.timeScale = 1f;
}

TDD Contract

⚠️ Legacy Skill — Refactor Pending

Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.

// Escribe estos tests ANTES de implementar:

// Test 1: should [expected behavior] when [condition]
[Test]
public void JuiceGameFeel_Should{ExpectedBehavior}_When{Condition}()
{{
    // Arrange
    // TODO: Setup test fixtures
    
    // Act
    // TODO: Execute system under test
    
    // Assert
    Assert.Fail("Not implemented — write test first");
}}

// Test 2: should handle [edge case]
[Test]
public void JuiceGameFeel_ShouldHandle{EdgeCase}()
{{
    // Arrange
    // TODO: Setup edge case scenario
    
    // Act
    // TODO: Execute
    
    // Assert
    Assert.Fail("Not implemented");
}}

// Test 3: should throw when [invalid input]
[Test]
public void JuiceGameFeel_ShouldThrow_When{InvalidInput}()
{{
    // Arrange
    var invalidInput = default;
    
    // Act & Assert
    Assert.Throws<Exception>(() => {{ /* execute */ }});
}}

Pasos para completar el TDD:

  1. Descomenta los tests above
  2. Implementa la funcionalidad mínima para que compile
  3. Ejecuta los tests — deben fallar (RED)
  4. Implementa la funcionalidad real
  5. Verifica que los tests pasen (GREEN)
  6. Refactorea manteniendo los tests verdes

Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.