How to properly change the game resolution?

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
M.Knight
Newbie
Posts: 15
Joined: Fri Jan 13, 2017 2:54 pm
Contact:

How to properly change the game resolution?

#1 Post by M.Knight » Tue Jan 24, 2017 5:07 pm

Hello,

When I created a VN project through Ren'Py, I chose the 1280x720 resolution. As a consequence, the gui.init line in gui.rpy looks like this :

Code: Select all

gui.init(1280, 720)
However, I realized that it would be better to switch the resolution to 1920x1080 and couldn't find the option to change it in Ren'Py itself, so I edited the above line to :

Code: Select all

gui.init(1920, 1080)
The issue is that while some of the screens successfully increased their resolution, others - such as the main menus - stayed exactly the same. The end result is this
The problem still occurs even if I add

Code: Select all

define config.screen_width = 1920
define config.screen_height = 1080
to options.rpy

Is there a specific option/menu that I missed somewhere in Ren'Py or a simple way to apply the resolution change to all the game's GUI elements, or will I have to edit every single GUI value in the config files?
Thanks in advance.

User avatar
PyTom
Ren'Py Creator
Posts: 15663
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: How to properly change the game resolution?

#2 Post by PyTom » Tue Jan 24, 2017 11:55 pm

Unfortunately, you basically have to regenerate the gui to change the resolution. That will overwrite all of the image files as well, but that's less bad, because the image files will be in the wrong resolution anyway.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
M.Knight
Newbie
Posts: 15
Joined: Fri Jan 13, 2017 2:54 pm
Contact:

Re: How to properly change the game resolution?

#3 Post by M.Knight » Wed Jan 25, 2017 3:07 pm

I forced the GUI regeneration (through the Change/Update GUI option) as you advised, and also deleted Persistent data.

The result is not quite perfect yet. While some elements have changed in size, some others are still misplaced :
https://i37.servimg.com/u/f37/11/48/49/65/resolu12.png
https://i37.servimg.com/u/f37/11/48/49/65/resolu11.png

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: How to properly change the game resolution?

#4 Post by nyaatrap » Wed Jan 25, 2017 3:29 pm

GUI images in its top folder won't be regenerated when only sizes are changed. It seems a bug or non-implemented feature that need to be fixed.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1151
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: How to properly change the game resolution?

#5 Post by Ocelot » Wed Jan 25, 2017 3:37 pm

This is more a problem with positioning and not images themselves. There a lot more problems than it is visible now (text width and positioning in textbox, for example)

Now you need to go through all of gui.rpy and change all values (for items positions, width and height of elements, etc.). Just go over each value, determine what it means and think if its value is sensible for new resolution.
< < insert Rick Cook quote here > >

User avatar
M.Knight
Newbie
Posts: 15
Joined: Fri Jan 13, 2017 2:54 pm
Contact:

Re: How to properly change the game resolution?

#6 Post by M.Knight » Wed Jan 25, 2017 4:06 pm

Damn, that sounds like a real pain. =O

I haven't really started working on the project and merely fiddled with the editor to get started.
Therefore, should I delete the project and regenerate it instead?

henvu50
Veteran
Posts: 260
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Re: How to properly change the game resolution?

#7 Post by henvu50 » Tue Jun 08, 2021 12:38 am

Damn it, somehow my renpy project started at 1280 x 720 instead of the 1920 x 1080 that I could've swore I selected. That selection menu is confusing.

How can I fix this? Do I have to transfer all my work to a new renpy project? It won't let me create a new Renpy project with the same Project name though.

There's always a problem. The problems never end. It's a continuous stream of never ending problems. I wonder when I'll be able to actually start making the game.

How are you supposed to pick 1920x1080 resolution? No matter what I do, Ren'py launcher refuses to make the game 1920x1080 resolution. It always makes it 1280x720

I hit the down arrow, it highlighted 1920x1080, then I hit enter?

It keeps making the new project at 1280x720.

Renpy version: renpy-7.4.5

Post Reply

Who is online

Users browsing this forum: No registered users