Skip to content

Sprite and UI interaction effects ​

This page is part of the GenPy Ren'Py learning path. It focuses on practical Ren'Py 8.x production and links each concept back to the GenPy workflow.

Learning goals ​

  • Make sprite and UI feedback readable, not distracting.
  • Keep character animation reusable.
  • Test interaction effects with real input devices.

Core syntax ​

  • speaker highlight
  • idle breathing
  • hover zoom
  • button feedback
  • ATL
  • screen action

Runnable example ​

text
transform bright:
    matrixcolor BrightnessMatrix(0.0)
    linear 0.25 matrixcolor BrightnessMatrix(0.0)   # 正常亮度

transform dim:
    linear 0.25 matrixcolor BrightnessMatrix(-0.35) # 压暗(也可配合 zoom 0.97 后移)

label talk:
    show eileen happy at bright
    show lucy normal at dim
    e "这句话是我说的。"

    show eileen happy at dim
    show lucy normal at bright
    l "现在轮到我了。"

Study outline ​

  • Start with the smallest example for sprite and ui interaction effects.
  • Test the key terms in a clean Ren'Py project: speaker highlight, idle breathing, hover zoom, button feedback.
  • Move the pattern back into your real project only after the example runs.
  • Use GenPy docs and validation to keep the feature connected to story, assets, and export readiness.

Common pitfalls ​

  • Test the smallest working script before layering on visual or UI complexity.
  • Run Ren'Py Lint before release builds, even when the script appears to run locally.
  • Keep examples in standard .rpy files so they remain editable outside GenPy.

Official references ​

How this fits in GenPy ​

  • Use Performance Editor for character staging and Screen Editor for UI interaction planning.
  • Use local preview for input-specific behavior.

Recommended GenPy docs:

Built for GenPy creators.