Is there any way to controll the game screen correctly?

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
sinezub
Newbie
Posts: 3
Joined: Wed Apr 07, 2021 3:38 pm
Contact:

Is there any way to controll the game screen correctly?

#1 Post by sinezub »

Hello there! I have a problem with my game's ui screen. This is kind of architecture problem.
I have an UI with buttons (like inteventory, map) and player's information (location, time of the day). All of these implemented in to the renpy's screen called ui.
As i know, there is a different layers in renpy to render the different things, and screen layer is above of any other.

So, what i wanted to achieve ? I trying to hide the UI on each dialogue. And I had suggestions like:
- Hide the screen when the say and choice screens appears: The problem of this method - the ui start blinking every time i jump between the labels and menus in dialogue.

- Hide screen via script. I guess, i should have a variable to controll the ui visibility and toggling it via method and etc. The problem is.. writing show_ui() hide_ui() in every dialogue scene looks like a really bad idea. What if i have thounds of dialogues scenes in game..

I able to write the function which calls the dialogue (label) with implemented hide_ui() function, but then i don't able to detect the end of dialogue, to show_ui() screen back.

Is there any good practices for that case? Or maybe I overthinking too much and there is really exists the good and elegant solution for this not big problem ?

User avatar
emz911
Regular
Posts: 103
Joined: Fri Jun 23, 2017 2:23 pm
Contact:

Re: Is there any way to controll the game screen correctly?

#2 Post by emz911 »

It might help if you could explain further - do you ever want dialogue and UI to be on screen at the same time? What is the player looking at when there are no dialogue and choice? Another screen that allows interaction? Posting your script here would help as well, so we can better understand what you wish to achieve. :)

Post Reply

Who is online

Users browsing this forum: No registered users