Odd behavior of overlay_functions since 10.1 [hotfix?]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Halen
Newbie
Posts: 2
Joined: Fri Dec 25, 2009 4:49 pm
Contact:

Odd behavior of overlay_functions since 10.1 [hotfix?]

#1 Post by Halen »

Hello,
I use overlay_functions for a while now, but since I updated from Renpy 10.0e to 10.1d the displayables in the overlay functions are drawn multiple times.

I wrote a short test script to demonstrate the problem:

Code: Select all

init:  
  $ e = Character('Narrator', color="#c8ffc8")
  
  image eliza one = "Eliza_FM_001.png"
  image bg        = "AlienCrashsite.jpg"
    
  python:    
    # my overlay function
    def global_ui_frame():
      ui.text("{color=#FF0000B0}{size=46}Test{/size}{/color}", xalign=renpy.random.random(),yalign=renpy.random.random(), drop_shadow=[(2,2),(0,0),(2,-2),(0,0)])
      
    # add my overlay function to the overlay_function list
    config.overlay_functions.append(global_ui_frame)

label start:

    show bg with dissolve
    show eliza one at center with moveinleft

    e "The overlay function places ONE >Test< at a random place on the screen."
    show eliza one at left with move
    e "..."
    show eliza one at right with move
    e "..."
    e "Multiple >Test< outputs are shown every transition."
I define a simple overlay funcion which writes the word "Test" at a random screen location ONCE.
Using Renpy 10.0e there is only one "Test" visible on screen which jumps around while the script is executed.
In version 10.1d I see multiple "Test"s on the screen, even after a transition is finished.

Is this a bug or is there a new way to handle overlays??

And BTW, hello all, this is my first posting.
Last edited by Halen on Sat Dec 26, 2009 9:16 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Odd behavior of overlay_functions since 10.1

#2 Post by PyTom »

This was a behavior change. I need to look at your program and see if the behavior that's going on is reasonable.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: Odd behavior of overlay_functions since 10.1

#3 Post by JinzouTamashii »

Was there a new release of Ren'Py recently?
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

Halen
Newbie
Posts: 2
Joined: Fri Dec 25, 2009 4:49 pm
Contact:

Re: Odd behavior of overlay_functions since 10.1

#4 Post by Halen »

I observed something, that may help to solve the issue:

While comparing the Renpy source code of 10.0 and 10.1 (/renpy/display/core.py) I noticed that the "compute_overlay" was only executed within the "interact_core" function in version 10.0.
In 10.1 the function is also called from "with_none". By removing the line "self.compute_overlay()" from this function the behavior is, what I consider correct again.

Edit: Behaves not 100% normal. The overlay dissolves in and out with every image which is shown or removed by dissolve.

Post Reply

Who is online

Users browsing this forum: Google [Bot]