Ren'Py

From Spring
Jump to navigationJump to search

Ren'Py is an open source visual novel engine, available here. It can be used in conjunction with Spring to provide a singleplayer experience with narrative, dialogue, images and videos.

Using Ren'Py with Spring

Without the use of sockets, Ren'Py and Spring can best communicate in the following way:

Ren'Py to Spring

Python can read a Spring startscript and modify it, say using str.format or the older % (modulo) operator. In this way, any arbitrary game, per-player or per-team information can be made available to Spring at runtime. It is also theoretically possible for Python to modify the contents of an .sdz or .sdd archive directly, but this is not recommended.

Spring to Ren'Py

A widget or gadget can write a Python file with any information to be communicated to Ren'Py, which it can then import using the execfile function. Bear in mind that because Spring is limited in which directories its Lua can write files to, Ren'Py will need to know where the Spring datadir is.

Examples

SpringPy is a code example for Spring-Ren'Py communication. You can check out the whole repo and open/run the Ren'Py project with the Ren'Py SDK.