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

_images/2021-03.jpg

Ren’Py Developer Update - March 2021 link

Welcome to March’s Ren’Py developer update. I’d say this month is somewhat interesting in that things are finally starting to feel a bit stable when it comes to platform development, which means I’m able to resume working on new features. In this month’s article, I’ll talk about that, and also describe the updates to the Google Analytics support that was first added in 2018.

Developer Update link

Old-Game link

Probably the biggest thing to happen in March was the release of Ren’Py 7.4.4. While this was mostly a bug fix release, it had an important new feature inspired by last month’s Patreon article. That’s the old-game directory, which is intended to take the game directory from a previous release of your game, or at least the .rpyc files from that release.

Old-game is intended for games that are released early access. After each release, the old-game directory can be updated by moving in the .rpyc files from that release. Since these files won’t be changed by Ren’Py, the .rpyc files in old-game can be checked into version control.

Ren’Py will use the .rpyc files in old-game when it creates new .rpyc files. Doing this ensures the chain of .rpyc files isn’t broken, which will help backwards compatibility exist.

Blend Modes link

Another feature, added in 7.4.4 and being improved in 7.4.5, is blend modes. Blend modes describe how a pixel being drawn (the source) is mixed with the pixel it’s being drawn on top of (the destination).

For example, the default blend mode in Ren’Py is called the “normal” blend mode. It uses the source pixel’s alpha channel to control how the pixels are mixed together. If the source pixel is opaque, only the source pixel is used. If it’s transparent, only the destination pixel is used, and in between the colors are proportional.

Ren’Py also supports an “additive” blend mode, in which the two pixels are added together. This mimics the way a light bulb works - the light it produces is added to the light coming from behind it.

Ren’Py 7.4.5 adds three more blend modes - “multiply”, “max”, and “min.” The multiply blend mode takes away the light that’s coming from behind our hypothetical light bulb. It does this by multiplying the channels of the source and destination, allowing it to darken the destination. The max and min modes take the maximum and minimum of the four channels.

In 7.4.5, blending will be done through transforms and ATL:

show eileen happy:
    blend "multiply"

It’ll also be possible to define custom blending modes, up to a point. Not every layer mode that can be found in Photoshop or The GIMP can be done on the level of GPU hardware that Ren’Py targets, but where it can be done, I’d like to add it.

3D Support link

One of the other things I’m working on is continuing to take advantage of the GL2 renderer to add support for projecting images into 2D. Over the last few days, I’ve added support for three-dimensional projection matrices to ATL.

What will this give us? There are three main things I’d like to add support for:

  • I’d like to add support for transitions that project images into three dimensions.
  • I’d like support for a 3D camera that’s hardware accelerated.
  • I’d like some form of 3D backgrounds.

I’m suspecting these features will be added in some way during the Ren’Py 7.4 release cycle, with future releases making these features more accessible.

Platform Support link

Not a ton changed on platform support this month, but I will report that I’ve used the contributions from Patreon to pick up an M1-based Mac Mini. While Ren’Py games already run on Apple Silicon using Rosetta 2, I’d like to get a native port going in the next few months.

I’m also starting to look at the yearly Android update, which I’d like to get out in the next release of so, before Google mandates that games comply with the change.

Analytics link

I’ve also received some report that the Google Analytics script from October 2018 wasn’t working, so I’ve gone ahead and updated it. It’s been changed to take advantage of some of the functionality found in newer versions of Ren’Py, and to match the updated Google API.

The end result works again, and doesn’t require any changes to the games that use the API, or how you set it up to work on the Google side of things, provided you’re using the Universal Analytics platform. All you have to do is download the updated analytics script file from:

https://patreon.renpy.org/_static/analytics.rpy

Then place it into your project’s game directory, and follow the instructions in the original article to integrate it with your game. If you’ve already integrated analytics, there isn’t anything else to add.

As always, thank you for your support.