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

Ren’Py Developer Update - January 2021 link

Hello everyone, and welcome to the first Ren’Py developer update of 2021. This has been an incredibly busy month for Ren’Py development, with two releases in January, following up on the release of Ren’Py 7.4 in the final hours of 2020. In this update, I’ll talk a bit about the release process, and how it’s going, and then I’ll drop the source code for a new transition I debuted at Visual;Conference 2020.

Ren’Py 7.4.x link

I called Ren’Py 7.4.0 ‘The Big One’, after the earthquake from disaster movies, since I sort of knew that for all my internal testing, at the end of the day the actual release would get it into the hands of a lot of people that hadn’t tried it yet, and some of those people would encounter problems that I’m unable to test for. At the same time, I think it was worth it to make the release when I did, as the problems would be found on release even if I delayed it for a few months, and I didn’t want to wait any longer to get it out.

I’ll admit there was a bit of a selfish aspect to it - I didn’t want to go all of 2020 without making a Ren’Py release. And so with a few hours left in the year, it came out.

Since then, I’ve been adding a few small features here and there, but I’ve mostly been furiously fixing bugs. Ren’Py 7.4.1 and Ren’Py 7.4.2 (which isn’t out while I’m writing this, but hopefully should be before this update I posted) both fix many bugs and improve compatibility. These are ‘everyone should update’ releases, which is what I write when I know that there are issues that only show up on some systems. (For example, a problem that only manifests on older versions of macOS, like a linker problem that happened in 7.4.0.)

There’s going to be at least one more ‘everyone should update’ release, 7.4.3, at least for the Android platform. I know that there are certain newer Samsung devices that aren’t running Ren’Py properly, so I’ll hold off releasing for Android until I can address those issues, which I hope to do within a week or two.

One of the nice things about the resources my sponsors make available is that it makes it possible for me to get hardware I don’t plan to use to test Ren’Py against. I was able to fix problems with a Galaxy S5 by getting used hardware, and I may look at getting (more expensive and newer) hardware to further address these problems.

I think that Ren’Py 7.4 is going about as well as I’d expected. A few months ago I wrote that this release scares me, and it did. But I’m starting to see the lights at the end of the tunnel, and I’m confident that releases of Ren’Py 7.4 will improve.

And the thing is, at the end of it, Ren’Py will be in a really good position for the future. The renpy-build system and the changes to Ren’Py’s internals will put us in a good position for Python 3-based Ren’Py 8. The GL2 renderer - which hasn’t had a lot of compatibility problems, thankfully - puts us in a good position for some features I want to add soon, like new transitions and the ability to render backgrounds in 3D.

I’m feeling good about Ren’Py, and I’ve been spending a ton of time on improving the engine. Thank you for supporting me and everyone who creates with it.

Visual;Conference link

The other big Ren’Py-related event of the past month was speaking at Visual;Conference. I’ll be honest and say I don’t think it was my best speech, but I’m hoping the release of Ren’Py 7.4.1 made up for it.

I think it was a valuable exercise for me, in any case, as giving a “state of the union” talk like that gets me thinking about the future. I’m sure there will be twists and turns along the way, but I now have a good vision of what I want to work on and where I want to take Ren’Py.

I think the two major themes of development are the obvious one - Python 3 support - but just as importantly, putting the Visual back in visual novel. It’s been a long time since I’ve added new visual things to Ren’Py. Now we’re starting to get them, with Live2D and shaders, and I’ll add more things going forwards.

Finally, while doing some research for the talk, I came around this page on VNDB, showing the popularity of different visual novel engines. I believe it counts releases, rather than games, but it’s still gratifying to see how many creators choose Ren’Py.

Swing Transition link

Here’s the script for a new transition that will be coming to Ren’Py 7.4 in a future release. It swings the screen in 3D around the Y-axis, such that one side comes towards the viewer and the other goes away. It isn’t done yet, but I figured I’d leak the work in progress here so you can try it out early.

No documentation for how it works - yet. It’s using some internal Matrix functions that I haven’t exposed, though I don’t think they’ll change at this point.

define config.gl2 = True

init python:

    class SwingTransition(renpy.Displayable):

        def __init__(self, delay, background="#000", old_widget=None, new_widget=None):
            super(SwingTransition, self).__init__()

            self.old = old_widget
            self.new = new_widget
            self.delay = delay
            self.background = renpy.displayable(background)

        def get_children(self):
            return [ self.background, self.old, self.new ]

        def render(self, width, height, st, at):

            halfdelay = self.delay / 2

            if st >= self.delay:
                child = self.new
                angle = 0
            elif st < halfdelay:
                renpy.redraw(self, 0)
                child = self.old
                angle = 90 * st / halfdelay
            else:
                renpy.redraw(self, 0)
                child = self.new
                angle = -90 + 90 * (st - halfdelay) / halfdelay

            cr = renpy.render(child, width, height, st, at)
            r = renpy.Render(cr.width, cr.height)
            r.blit(cr, (0, 0))

            r.reverse = Matrix.offset(width / 2, 0, 0)
            r.reverse *= Matrix.rotate(0, -angle, 0)
            r.reverse *= Matrix.offset(-width / 2, 0, 0)
            r.reverse = Matrix.perspective(width, height, 100, 1000, 20000) * r.reverse

            rv = renpy.Render(width, height)
            rv.place(self.background)
            rv.blit(r, (0, 0))

            return rv

    Swing = renpy.curry(SwingTransition)


label start:

    window show

    scene bg washington
    show eileen happy

    pause

    show bg whitehouse
    show eileen vhappy
    with Swing(2.0)

    jump start