Setting Default Game Window Size?

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
User avatar
Tiimx
Newbie
Posts: 7
Joined: Wed May 12, 2021 4:13 am
Projects: Promises Season 1
Organization: Tiimx Studios
itch: tiimx-studios
Discord: Tiimx#0001
Contact:

Setting Default Game Window Size?

#1 Post by Tiimx »

Hello! I'm trying to figure out how to set the default game window size when you select "window" in the display preference menu.

Code: Select all

if renpy.variant("pc") or renpy.variant("web"):

                    vbox:
                        style_prefix "radio"
                        label _("Display")
                        textbutton _("Window") action Preference("display", "window")
                        textbutton _("Fullscreen") action Preference("display", "fullscreen")
I know by changing "window" to "all window" display will temporarily make any custom size the window size, but once you go fullscreen, or exit the game, it defaults back to it's small size. I'm having this issue for all Ren'py games, not just my own, which leads me to think it's somewhere in the Ren'py directory, but I'm lost on where I can change the preferences for this.

Edit: Sorry for the confusion, the problem is making the window display's default size the maximum size, as mine currently is not.
Last edited by Tiimx on Mon Dec 13, 2021 8:57 pm, edited 1 time in total.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Setting Default Game Window Size?

#2 Post by rayminator »

I think this might help it might work or it might not

Code: Select all

$ renpy.display("display", "fullscreen")
or this but it old code

Code: Select all

config.default_fullscreen = True
or this

Code: Select all

init:
    if not persistent.set_fullscreen:
        $ _preferences.fullscreen = True
        $ persistent.set_fullscreen = True

User avatar
Tiimx
Newbie
Posts: 7
Joined: Wed May 12, 2021 4:13 am
Projects: Promises Season 1
Organization: Tiimx Studios
itch: tiimx-studios
Discord: Tiimx#0001
Contact:

Re: Setting Default Game Window Size?

#3 Post by Tiimx »

rayminator wrote: Mon Dec 13, 2021 8:25 pm I think this might help it might work or it might not

Code: Select all

$ renpy.display("display", "fullscreen")
or this but it old code

Code: Select all

config.default_fullscreen = True
or this

Code: Select all

init:
    if not persistent.set_fullscreen:
        $ _preferences.fullscreen = True
        $ persistent.set_fullscreen = True
Okay First: So, these seem to work for each individual game, but where would I put them to make it work for all ren'py games.
Second: The third init block only works if the player previously has fullscreen selected, once they select windowed, it won't automatically become fullscreen anymore until they select it.
And finally, these all seem to work in the sense of making the game open as fullscreen, but it doesn't solve the problem of having the default window size change.

Making the game fullscreen isn't a problem, as there's multiple ways to do it (as you've shown), but the default size for "window" display still isn't 1920x1080 or whatever the maximum window display size is.

Post Reply

Who is online

Users browsing this forum: No registered users