Welcome to the sponsor-exclusive content for the Ren'Py Patreon. Sponsors like you ensure this page exists. Thank you.
Hello again, and welcome to this month’s Ren’Py developer update.
May was spent working on getting Ren’Py 7.4.5 out the door, and that’s been done. Ren’Py 7.4.6 will follow shortly to fix a few issues that people have reported. In this month’s report, I’ll talk about some of the things that were addressed in May, and then show off a way to visualize the new 3D Stage.
A lot of this month was taken up by Android, which changes rapidly compared to some of the other platforms that we support. The big issue that came up this month was that the bintray service, which hosted some of the libraries that are used, decided to shut down. This meant that existing projects would still build, but new Android projects became unable to compile.
Thankfully, I was able to find those libraries and include them with Ren’Py, so it’s now possible to once again create new Android projects. As the libraries are the ones that support the Expansion APK format, this is something of an interim thing for us to do, as by mid summer Ren’Py will support the Android Archive (AAR), which replaces APKs in many circumstances.
Another big thing I did this month was to rewrite the way Ren’Py starts on Android, to improve the reliability. Before the change, Ren’Py would display the presplash screen in a 2D mode, and then switch to an OpenGL mode for the actual gameplay. Ren’Py always displayed the game properly using OpenGL technologies, to take advantage of hardware acceleration.
A problem was that on some hardware, switching from the 2D splashscreen to OpenGL would cause the game to partially restart. On this hardware, we’d get a black screen, and the game would be unplayable. To fix this, the startup was rewritten to always be in 3D, with a 2D overlay on top of the 3D. Doing this eliminated the startup problems.
Another thing I did this month was refamiliarize myself with the web port, now that Beuc, who maintained it, has moved on to other projects.
A big portion of this was tracking down a problem with the web port on Mobile Safari (and other web browsers that use the Mobile Safari engine, which is all of them on iOS). Unfortunately, the bug turned out to be something that Apple introduced, so the only solution was to encourage players to report the problem to Apple, rather than the game developers or myself.
I’m expecting to do a bit more work on the web port in the next month or so, especially trying to address sound stuttering. Right now, my leading idea is to move the sound playback into the browser proper.
The big highlight of May was the Ren’Py 7.4.5 release project. In retrospect, this release has grown to the point where it could probably have been a major release. I’m quite proud of this release, as it adds new capabilities like the 3D Stage system that games can take advantage of.
Thank you for being a part of it.
Ren’Py 7.4.6 should be out in the next few days, as a small release that will clean up some issues in 7.4.5. So please look for that, especially if you need to support iOS.
Perhaps the biggest new feature in 7.4.5 is the 3D stage, which lets you position images in 3D, so you can see how they relate to each other. As there’s documentation on how to use it on the Ren’Py website , I won’t repeat that here, at least until I have a better way to present it, which will only come with time.
One thing I have been experimenting with is new ways to visualize the 3D Stage, and here’s an example of one of them. First, a segment of script that needs to be added once:
# Variables to store the rotation and offset.
default v3d_yrotate = 0
default v3d_zoffset = 0
# A screen that allows the player to adjust the 3D visualization.
screen visualize3d():
frame:
style "empty"
background "#0004"
xsize 480
style_prefix ""
has vbox:
spacing 2
hbox:
text "Y" color "#fff" minwidth 20
bar:
value VariableValue("v3d_yrotate", 180, offset=-90)
left_bar "#fff8"
right_bar "#0008"
hbox:
text "Z" color "#fff" minwidth 20
bar:
value VariableValue("v3d_zoffset", 2000)
left_bar "#fff8"
right_bar "#0008"
textbutton "Reset":
style "_default"
action [ SetVariable("v3d_zoffset", 0), SetVariable("v3d_yrotate", 0) ]
text_color "#ddd"
text_hover_color "#fff"
# A transform that does the visualization.
init python:
def v3d_function(trans, st, at):
trans.matrixtransform = Matrix.offset(0, 0, -v3d_zoffset) * Matrix.rotate(0, v3d_yrotate, 0)
return None
v3d_transform = Transform(function=v3d_function)
To use it, you’ll want to show the visualize3d screen, and then add
v3d_transform to show layer statements that include perspective:
label start:
show screen visualize3d
show layer master at v3d_transform:
perspective True
scene bg washington:
xalign 0.5 yalign 1.0 zpos 1000 zzoom True
show lucy mad:
xalign 1.0 yalign 1.0 zpos 300
show eileen happy:
xalign 0.5 yalign 1.0 zpos 500
pause
What this does is to bring up a little window in the top left of the screen, that lets you rotate around the y axis, and dolly in and out on the z axis, to get a feel for where sprites are located, relative to each other.
I’m still not 100% sure of this visualization - I think zzoom
looks a bit weird, as it causes the background to drop down below the sprite.
At the same time, it’s accurate - the zzoom property scales the background
in all directions, which means its base is lower. At the very least, I’ll
probably add a plane representing the bottom of the screen.
For now, it’s best to treat this visualization as a preview of something that will be in a future version of Ren’Py. Until next month, thank you for your support.