Reference Manual: (offline | online) Quickstart: (offline | online)

Minigame Interface

The minigame interface exists to let one integrate non-visual-novel segments into Ren'Py games. It's expected that minigame creators will be comfortable programming in Python. The minigame interface provides a documented and supported set of functions the programmer can use to access the functionality needed to create minigames. The minigame interface assumes a familiarity with pygame.

The minigame interface uses Ren'Py's built-in screen update management system. This system compares lists of blits between frames, to find the areas of the screen that have changed between frames. Only these areas are drawn. This makes it unnecessary to do such update management by hand. To ensure optimal peformance of this system, the same surfaces should be used for each frame. (This can often be accomplished by using Minigame.load_image, which uses Ren'Py's image cache.)

Ren'Py supports loading, saving, and rollback during minigames, unless the key/mouse bindings used are overridden by the minigame. Loads, saves, and rollback bring the user to the start of the minigame, or to a Ren'Py statement before the minigame.

Minigame Object

Render Object

Right now, the render object is mostly undocumented. We will assert it has height and width fields, and the following methods:

Reference Manual: (offline | online) Quickstart: (offline | online)