Welcome to the sponsor-exclusive content for the Ren'Py Patreon. Sponsors like you ensure this page exists. Thank you.

_images/2021-07.jpg

Ren’Py Developer Update - July 2021 link

Welcome to the seventh Ren’Py developer update of 2021. As usual, this covers the development that took place in July. It also will discuss the next two releases, and let you know how to use one of the new features in Ren’Py 7.4.8.

July 2021 link

7.4.7 link

In July, I released Ren’Py 7.4.7. The highlight of this release was improvements in platform support for the web platform and iOS. While Apple has yet to fix the Safari issues, on all other web browsers we now play back audio through the web browser’s built-in sound decoding, which makes for much smoother audio playback.

On the iOS side, 7.4.7 features an updated build process using newer tools. Apart from simplifying the build and keeping Ren’Py up to date, this also includes the target SDK version in the iOS program, which is something newer iPhones look at. When run on the iPhone 12, Ren’Py games would have borders on all four sides, due to the way iOS scales older apps. The changes in 7.4.7 makes the build run better on newer iOS devices.

An issue I’m aware of is one where text is distorted, while images display fine - as shown in issue 2847. This only seems to happen on Windows 7 and older, with old AMD video drivers from 2012-2013. I made a couple of changes to try to address this problem.

Testing these changes was a bit of a problem, as I was unable to do so, despite bringing in some obsolete video hardware. (I bought a 2008-era Radeon 5450 using funds from this Patreon in the hopes of tracking this down.) Unfortunately, the older video drivers that cause this problem aren’t available for download anymore, so I wasn’t able to repeat the problem to determine if it’s fixed. While the right answer is to upgrade the drivers, initial feedback is that 7.4.7 addresses the issue for players that aren’t able to do so.

Beyond this, there are a number of bug fixes - some of which unfortunately introduced regressions of their own, leading to 7.4.8 coming out in the next few days.

Planned Releases link

There are two more 7.4 releases I’m planning on getting out soon, with 7.4.8 coming out in the next week and 7.4.9 coming out shortly thereafter.

7.4.8 link

The 7.4.8 release is going to be nearly a pure fix-release, though one new feature will be in it. I aim to get this out ASAP, as 7.4.7 had a flaw that could cause rollback to corrupt game data.

Notably, if you updated a list or dictionary, the change to the dictionary could reappear after rollback, and then show up again when the user passes through the original change. This could cause duplications in the game.

Since this could corrupt data, I’d suggest holding off releases of games with such data structures until 7.4.8 is released.

Along with a few other, more minor fixes, 7.4.8 will add the ability to pause movies.

7.4.9 link

7.4.9 should also follow, ideally in August, and is planned to include support for Android App Bundles. This is a new format that the Google Play store is requiring for new applications, and so I’ll need to add it to Ren’Py before new applications can be released to the Play Store.

The big advantage of Android App Bundle is it should simplify creating games for multiple platforms.

Pausing Movies link

The one new feature in 7.4.8 is going to be the ability to let the player pause the movie during playback. This will be done through the existing PlayAudio() action, or its equivalent, renpy.music.set_pause().

Both require the channel of a movie to be known, and so to use these actions, Movies will need to have the channel the movie is played on specified. The channel “movie” is special (used by renpy.movie_cutscene()), and so I suggest playing movies on channel “m”.

Here’s the example I used to test this feature:

image movie miku = Movie(channel="m", play="miku.mkv")


screen pause_screen():
    vbox:
        textbutton "Pause Movie" action PauseAudio("m", True)
        textbutton "Resume Playing" action PauseAudio("m", False)
        textbutton "Toggle Pause" action PauseAudio("m", "toggle")

label start:

    scene movie miku
    show screen pause_screen

    pause

    hide screen pause_screen
    hide movie miku

    "..."

    return

Again, notice how channel="m" is used to assign the movie to the channel that the PauseAudio actions work on. There isn’t a problem having multiple movies using the same channel, provided only one movie is being run at once.

And that’s it for July’s update. This month was a little shorter than average, as I took a little bit of a vacation this week, but next month should have quite a bit in it. As always, thank you for your support.