Auto- scaling ALL sizes (fonts, images, aspect ratios).
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.
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.
Auto- scaling ALL sizes (fonts, images, aspect ratios).
Hello all,
can anybody remind me how to get system variable of screen size and define all game vars according to that? For example positions of displaying images like 1/3 of screen height and 1/3 of screen width (game window screen both for windowed and fullcreen mode). I mean setting all X's and Y's like: 0.3*max_X, 0.3*max_Y. Where are they, those vars and what are the functions for them?
Thanks!
can anybody remind me how to get system variable of screen size and define all game vars according to that? For example positions of displaying images like 1/3 of screen height and 1/3 of screen width (game window screen both for windowed and fullcreen mode). I mean setting all X's and Y's like: 0.3*max_X, 0.3*max_Y. Where are they, those vars and what are the functions for them?
Thanks!
Re: Auto- scaling ALL sizes (fonts, images, aspect ratios).
You can set relative positions likehttps://www.renpy.org/doc/html/style_pr ... perty-xpos
The game resolution is set by config.screen_height and config.screen_width variables (https://www.renpy.org/doc/html/config.h ... een_height), so one can use them like
Also, you can get the phisical size of game window in pixels - https://www.renpy.org/doc/html/other.ht ... sical_size
Code: Select all
pos (0.3, 0.5)
align (0.5, 0.5)The game resolution is set by config.screen_height and config.screen_width variables (https://www.renpy.org/doc/html/config.h ... een_height), so one can use them like
Code: Select all
$ x = config.screen_height / 2- Taleweaver
- Writing Maniac
- Posts: 3428
- Joined: Tue Nov 11, 2003 8:51 am
- Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
- Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
- Organization: Tall Tales Productions
- Location: Germany
- Contact:
Re: Auto- scaling ALL sizes (fonts, images, aspect ratios).
Ren'Py question. Moved to the appropriate forum.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of DaemonophiliaScriptwriter and director of The Dreaming
Scriptwriter of Zenith ChroniclesScriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is DeadScriptwriter and producer of Adrift
More about me in my blog"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira
Re: Auto- scaling ALL sizes (fonts, images, aspect ratios).
Thanks, but how about font size? If game runs on big screens - how can I increase it automatically?
Re: Auto- scaling ALL sizes (fonts, images, aspect ratios).
Actually, all you need is to set game resolution and use appropriate font size and images - if player runs the game on a big screen it will be automatically scaled up.
Who is online
Users browsing this forum: Bing [Bot]
