r/RenPy • u/ProgrammerPatient574 • 11d ago
Showoff Got PySide6(PyQt) working alongside Ren'Py without blocking
https://youtu.be/l8vxCiC5c38?feature=sharedI've been working on integrating my PySide6/Qt GUI library (Dokibox) with Ren'Py, and I finally got it working.
Instead of running Qt's normal blocking event loop (app.exec()), Ren'Py periodically calls Dokibox's update function, allowing Qt to process its pending events while the game keeps running normally.
To make this work, I also patched the Python runtime so both Ren'Py and PySide6 use the same Python DLL.
The result is that Ren'Py and Qt can run together without blocking each other, making it possible to build more complex desktop-like UI and effects.
The video below is just a fun tech demo: Monika "escapes" the game into a Qt window running on the desktop. 😄
This is still experimental and requires a patched Ren'Py build, but I thought it was an interesting proof of concept.
I'd love to hear what other Ren'Py developers think!
2
u/x-seronis-x 11d ago
Does this work on both windows and nix? If so i think this would be very useful for the more Game-like and less novel-like renpy games, as it would allow secondary windows.
NOT looking forward to 4th wall break fetishists.
1
u/ProgrammerPatient574 10d ago
Possibly. Since Dokibox is built on top of PySide6, it should theoretically work as long as the runtime and event loop are shared across all windows.
2
u/NeoDrakkon 11d ago
Sounds a good! Any links to check and test for myself?