Working out the details for the Gallium Games recruitment event/competition we mentioned at the start of the year.


Ren’Py Android purchase

By default, when you want to make an in-app purchase on a Ren’Py game, you’ll see a black screen as the Google purchase pop-up appears.

black background, google play pop up asking if you want to make an in-app purchase

Because DMR uses some extra layers, this breaks things. During out betas, our testers found stars floating around (the button we use to open/close the quick menu). The same thing happened here.

It took a little digging around in the source code of Ren’Py to find out where that black screen was coming from.

In 00iap.rpy, we have:

init -1500 python in iap:

    from store import persistent, Action
    import time

    background = "black"

def with_background(f, *args, **kwargs):
    """
    Displays the background, then invokes `f`.
    """

    if background is not None:
        renpy.scene()
        renpy.show(background)

    renpy.pause(0)

    return f(*args, **kwargs)
        

We don’t want to call renpy.scene() because it breaks with floating stars, so we just have to define background = None.

init -1000 python in iap:
    background = None

We set the priority to some number -1500 so that we overwrite the initial variable value. We also have to make sure to put the variable under the scope of iap.

google play purchase screen pop up with dmr main menu visible

Recruitment event status

We’re ironing out the final details and timeline for the Gallium Games recruitment event/competition this week! Stay tuned for the drop, coming very soon.

Questions or Comments?

Feel free to send in any AG-related questions! Our Ask Box is always open.

Thanks so much for all of your amazing support, and stay safe out there!