Ren'Py Renpy screen glitch with pause menu

TheTypist

Active Member
Donor
Game Developer
Sep 7, 2017
694
4,185
Hey guys, I've created a simple screen as a part of my gallery in game. It works perfectly fine, there are also imagebuttons over animated background that all work great and do what they need to do. However, when you enter the pause menu, and try to click any button that isn't "Save" Or "Main Menu" the screen glitches and it doesn't let you use these other settings. If you right click or pause again, the screen goes back to normal. I would like to keep the animated background, does anyone have a solution to this that will allow the other load screens and such to function normally?


Code:
screen office_screen():
    tag menu
    add Movie(size=(1920, 1080))
    on "show" action Play("movie", "movies/office.webm", loop=True)
    on "hide" action Stop("movie")
 

DiviDreamer

Member
Aug 29, 2020
271
247
What you mean by pause menu?
video stutter when you enter menu? this often caused by video with big bit rate
 

TheTypist

Active Member
Donor
Game Developer
Sep 7, 2017
694
4,185
What you mean by pause menu?
video stutter when you enter menu? this often caused by video with big bit rate
I should have been more clear, basically when entering a pause menu, I was able to click the save screen but if you attempted to click "Load" or any other menu, it would freeze up and show a still image of the animation till you paused again by right clicking or hitting escape. It's an issue multiple people online have had but with the help of a redditor I was able to solve it.

So, for anyone wondering how to add a video or movie to a screen and have it work, this is the correct way to format it.

Code:
screen screen_name():
    tag menu
    add "video_name"
    
#naming the video

image video_name =     Movie(channel="movie_dp", play="movies/videotitle.webm", size = (1920, 1080))
I'm sure it could be done differently, but this solved the issue I was having, is simple, and most importantly works in my case.
 
  • Like
Reactions: DiviDreamer

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,971
16,229
I should have been more clear, basically when entering a pause menu, I was able to click the save screen but if you attempted to click "Load" or any other menu, it would freeze up and show a still image of the animation till you paused again by right clicking or hitting escape. It's an issue multiple people online have had but with the help of a redditor I was able to solve it.
What is logical.

When you provide a static value (add movieName), Ren'Py expect it to don't need refreshing. Therefore, it display, then totally forgot about it. Your movie will just continue to play, like a TV would continue, even when you left the room.

But when you provide a dynamic value (add Movie( whatever )), Ren'Py will refresh it as often as it refresh the screen itself, and it's what make the movie play. When you put this screen on the background, Ren'Py will refresh it less often, when it don't simply skip the refresh, with the result you got.
It's like your TV asking you every two minutes if you're still watching. If you left the room for more than two minutes, you'll find it in pause mode when you'll come back.
 
  • Like
Reactions: DiviDreamer