Skip to content

Language basics ​

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 ​

  • Recognize .rpy files and the game/ directory.
  • Use indentation to express blocks safely.
  • Read the common statement types you will see in beginner projects.

Core syntax ​

  • .rpy
  • indentation
  • strings
  • comments
  • label
  • Character

Runnable example ​

text
label start:
    e "我在 start 块里。"
    menu:
        "选项 A":
            e "我在选项 A 的块里。"
        "选项 B":
            e "我在选项 B 的块里。"
    e "menu 结束后回到这里。"

Study outline ​

  • Start with the smallest example for language basics.
  • Test the key terms in a clean Ren'Py project: .rpy, indentation, strings, comments.
  • 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 GenPy Code mode to keep scripts readable while the Story Graph checks structure.
  • Use Validation when indentation or missing labels become hard to spot manually.

Recommended GenPy docs:

Built for GenPy creators.