Hello,
When building a Renpy 8.1.3 game for web (always), and in standalone whenever I increase the window size beyond the base resolution 1080p, including when toggling fullscreen to my monitor native resolution 1440p, OR I shrink it to a lower resolution, I noticed glitchy grid lines appearing at regular intervals on my screen, as if splitting my textures into small rectangles.
At first I thought it was web-specific, then two users reported the same issue on standalone windows and mac builds (I could not repro on standalone Linux / Android).
See this screenshot:
This is the first time it happens to me in a Renpy game. I cannot find any information on this looking for the words "grid lines".
I found https://www.renpy.org/doc/html/display_problems.html and apparently toggling fullscreen helps with standalone windows, but not web (unconfirmed on mac). Shift+G renderer could help too but couldn't test it myself as I don't have the issue on standalone.
Is there any existing Lemmasoft/GitHub thread on this? Is F / Shift+G enough to fix the issue? I can add a Troubleshooting section on the game page to help users, but what do you recommend me to write?
Finally, why is only my game causing the issue? I use 1920x1080 assets in webp and NVL mode.
I can try to extract a MWE with non-copyrighted assets for a repro, if I find the common factor.
EDIT: when switching web/standalone view to full monitor size 1440p, the grids are placed a regular intervals of 100px... must not be a coincidence.
Extra information:
- The lines do not appear on the main menu/game menu
[SOLVED] Increasing window size or toggling fullscreen shows unwanted grid lines at regular interval (bad 9-slice frame)
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.
- komehara
- Regular
- Posts: 36
- Joined: Fri Jan 31, 2020 10:08 pm
- Projects: Spirit Link
- Tumblr: hsandt
- Deviantart: hsandt
- Github: hsandt
- itch: komehara
- Contact:
[SOLVED] Increasing window size or toggling fullscreen shows unwanted grid lines at regular interval (bad 9-slice frame)
Last edited by komehara on Wed Jan 03, 2024 10:33 am, edited 1 time in total.
- komehara
- Regular
- Posts: 36
- Joined: Fri Jan 31, 2020 10:08 pm
- Projects: Spirit Link
- Tumblr: hsandt
- Deviantart: hsandt
- Github: hsandt
- itch: komehara
- Contact:
Re: Increasing window size or toggling fullscreen shows unwanted grid lines at regular intervals on screen (web, standal
So I found the cause to be a custom Frame image that surrounds the whole screen.
I defined it using custom Borders like this:
to match *exactly* the size of the left/top/right/bottom edges of the 9-slice texture:
but it turns out it's bad when the algo rounds pixel positions to the nearest integer when stretching the window (with a non-integer multiple). So I added an extra pixel of safety:
and the lines disappeared!
I'm not sure if it's a bug that the algo rounds the Borders this way, or just unavoidable, and it forces me to "lose" a good edge pixel at native resolution 1920x1080 when calculations are perfect. Either way, I remembered I had a similar issue in other engines and that it's safer to keep 1 or 2 px of margin when dealing with 9-slice frames.
I defined it using custom Borders like this:
Code: Select all
define gui.ingame_frame_borders = Borders(43, 44, 43, 44)
but it turns out it's bad when the algo rounds pixel positions to the nearest integer when stretching the window (with a non-integer multiple). So I added an extra pixel of safety:
Code: Select all
define gui.ingame_frame_borders = Borders(44, 45, 44, 45)
I'm not sure if it's a bug that the algo rounds the Borders this way, or just unavoidable, and it forces me to "lose" a good edge pixel at native resolution 1920x1080 when calculations are perfect. Either way, I remembered I had a similar issue in other engines and that it's safer to keep 1 or 2 px of margin when dealing with 9-slice frames.
Who is online
Users browsing this forum: Bing [Bot]