Ren'Py Launch Ren'Py game maximized

red-NINE

Newbie
Jul 11, 2019
73
586
Hi,
I am learning renpy in hopes of making my own game and cant seem to find an option to launch the in maximized mode.
To clarify, I want my game to be launched in maximized mode (NOT Fullscreen or Windowed mode) at startup if the user is running it first time on their system.
Can Anyone help with this or is there no way of doing it?
As I am still a noob I would appreciate an elaborate answer.

P.S.
I Dont know how to display an image at the absolute center of the screen. When i use "show image at center" the image is displayed at the center of x axis and its still touching the bottom of the screen. I want the image to be at the center of both x and y axis.
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
Best I can offer is to start fullscreen on first time use.

You need only add this line to your options.rpy file.

Python:
define config.default_fullscreen = True

It will tell RenPy to use Full Screen for the first time the game is run. After that, it is ignored and the game will use whatever window configuration and size was used the previous time. This is the preferred method, since it still lets the player have the final choice about how they play the game. It is probably telling that the exception to this "starts how is was last time" is that it never restarts maximized.

There might be some really obscure voodoo that overrides things, but if there is - I haven't come across it. I did see a post while searching just now that the sort of "borderless windowed mode" isn't possible because of a need to remain compatible with the Chrome browser, though I may be misunderstanding that answer.

The center thing... you want show image at truecenter. See:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
To clarify, I want my game to be launched in maximized mode (NOT Fullscreen or Windowed mode) at startup if the user is running it first time on their system.
Can you explain the difference between "maximized" and "fullscreen" ?

If the computer screen is smaller than the resolution defined in "option.rpy", Ren'py will use the nearest fitting size for this ratio ; what generally mean the whole screen. And if the computer screen is bigger than the resolution defined in "option.rpy", Ren'py have absolutely no reason to go further. Firstly because, if the author wanted a bigger resolution, he would have used it. Secondly because, you'll always have a better quality when reducing a screen, than when increasing it ; it's easier to remove information that to invent some.


I Dont know how to display an image at the absolute center of the screen. When i use "show image at center" the image is displayed at the center of x axis and its still touching the bottom of the screen. I want the image to be at the center of both x and y axis.
center is to see as one of the four text position (right, center, justify, left). What you want is truecenter.
 
Apr 24, 2020
192
257
The closest thing I can get is to scale the window to 100% of its size. The says it can go up to 200%, but I had no such luck.

Here's the code, but it wasn't intended for this purpose.

Python:
label splashscreen:
    $ Preference("display", 1.0)()
    return
 

moskyx

Forum Fanatic
Jun 17, 2019
4,230
13,990
View attachment 1276168 View attachment 1276169 View attachment 1276174
I want the game to be launched like the second image, for the first time.
What would be exactly the purpose of this? There must be a creative reason you're not telling us, because if that's not the case then you'd better reconsider your idea. As Anne has said, increasing the resolution of your game will make the opening window to go bigger, but in the end it will always depend on user's screen. And usually it's never a wise idea to impose those kind of settings on players: what if someone prefer their Ren'Py games to be opened in a smaller and inconspicuous window instead? So let Ren'py handle it the way it usually does (which as far as I know has never raised any complaints from users). After all, next time players open your game, it will be launched in the size they actually want it. Why impose them a maximized window only for their first try?
 

red-NINE

Newbie
Jul 11, 2019
73
586
What would be exactly the purpose of this? There must be a creative reason you're not telling us, because if that's not the case then you'd better reconsider your idea. As Anne has said, increasing the resolution of your game will make the opening window to go bigger, but in the end it will always depend on user's screen. And usually it's never a wise idea to impose those kind of settings on players: what if someone prefer their Ren'Py games to be opened in a smaller and inconspicuous window instead? So let Ren'py handle it the way it usually does (which as far as I know has never raised any complaints from users). After all, next time players open your game, it will be launched in the size they actually want it. Why impose them a maximized window only for their first try?
There is a creative reason behind - I want the game to be as user friendly as possible.
If i increase the resolution (more than the users display resolution), when the game is launched, the game window sometimes covers the taskbar. Fullscreen gives the best immersion but as the game is NSFW, there is no way to close the game or switch to another program instantly with the mouse.
I know every user has their own preference and i have played many games and found the maximized screen to be the best(atleast for me)
 

moskyx

Forum Fanatic
Jun 17, 2019
4,230
13,990
There is a creative reason behind - I want the game to be as user friendly as possible.
If i increase the resolution (more than the users display resolution), when the game is launched, the game window sometimes covers the taskbar. Fullscreen gives the best immersion but as the game is NSFW, there is no way to close the game or switch to another program instantly with the mouse.
I know every user has their own preference and i have played many games and found the maximized screen to be the best(atleast for me)
When talking about a creative reason I was thinking in a shocking initial splashscreen. Now, if you are aiming for user-friendliness, then by all means don't touch what's been working fine enough for years and millions(?) of users. Quoting yourself, every user has their own preference, so please remember your initial goal of being user-friendly and don't impose your 'best' on others. Because for you it's better a maximized screen, but for me it's better a smaller one (even if sometimes it covers part of the taskbar). With the usual setting, you'd be slightly annoyed but you'd only need to click on maximize to get what you want; with your forced setting, firstly I'd panic when the game gets launched covering the whole screen and then I would need to rush and click to minimize it - or to close it straight away. And being slightly annoyed it's a more prefereable reaction from your player base than being in panic and rushing to find the damn button: you won't lose any of the former.

TL; DR: there's no perfect solution so my advise would be to just leave it be, as a maximized window is pretty much the same than a fullscreen, and nobody wants their lewd amusement to go on fullscreen without warning
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,504
8,040
Resolution should not be touched, once you pick it at the project start, you will use said information to properly make the assets for your game.

What you want to try is "$renpy.set_physical_size((width, height))" where width and height are both floats.
Just like full screen, Ren'Py will auto-scale everything for you.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
If i increase the resolution (more than the users display resolution), when the game is launched, the game window sometimes covers the taskbar.
With Ren'py ? No, it don't.

Just verify by yourself. Open the gui.rpy file, and change gui.init(1920, 1080) into gui.init( 4224, 2376 ), then launch the game.
Despite Ren'py expecting to use images that will take 110% of your screen, it resized itself in order to fit the screen its displayed on, and to do this while not messing with the user by interfering with a part of the OS interface.

The game is not maximized on your example because it have no reason to be since you configured the game for a 3K resolution, what is smaller than your 4k screen. And, as I said, there's absolutely no reason to force someone to play on an higher resolution that the one of the images in the game.
It's not increasing the experience of the user to do so, it's pissing off many of them.

Most Ren'py games use images with a resolution of 1920x1080, while around 20% of the world still have a screen with a lower resolution. Still, have your heard someone complain that he was forced to resize all Ren'py game, because it was messing with his task bar ? No, because it don't happen.
 

red-NINE

Newbie
Jul 11, 2019
73
586
With Ren'py ? No, it don't.

Just verify by yourself. Open the gui.rpy file, and change gui.init(1920, 1080) into gui.init( 4224, 2376 ), then launch the game.
Despite Ren'py expecting to use images that will take 110% of your screen, it resized itself in order to fit the screen its displayed on, and to do this while not messing with the user by interfering with a part of the OS interface.
Just checked, you're right it didnt go over taskbar even with 8k resolution.