Black Interior Border in Windowed Mode

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
majike
Regular
Posts: 34
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Black Interior Border in Windowed Mode

#1 Post by majike »

Among with several problems I seem to be having with my project on Ren'Py, I seem to be encountering this persistent problem of a 1 PX black border appearing in the window of the game, as demonstrated below on the right and bottom.
Border.png
I have searched through the forums via Google on top of Google in general, have repeatedly tried different window resolutions (a good number of which end up with some variation of a single black border, two black borders, and I think even three of them, once), but it is troubling that this standard iPad-friendly size continues to be giving me problems.

I have included a RAR of my project (which is essentially nothing more than a bare-bones placeholder for myself to test out and refine the format), as I am unsure of what part of the project the problem is and I am puzzled about no-one seeming to have experienced such a thing before, if the lack of Google hits for this forum and elsewhere are anything to go by.

I am not sure if it would be of any relevance or use, but in case it is, I use Windows 10 64-Bit Home Edition, have a NVIDIA GeForce GTX 745, and my monitor is set to display at 1920x1080 px

Many thanks in advance,
Maj
Attachments
Forum.rar
(1.51 MiB) Downloaded 12 times

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Black Interior Border in Windowed Mode

#2 Post by kivik »

It's to do with your unusual resolution and aspect ratio.

My guess is, since you've specified a higher resolution than your screen, and when it resizes down to your screen resolution (and mine, due to the height), it's rendering a black border to maintain the ratio you've specified, but since it's higher resolution than your monitor the border is sub-1 pixel, but still there - so it's rendered as a 1 pixel border.

If you change it to 1531 width the border appears at the top instead.

My recommendation is to use a lower resolution that falls within the boundaries of standard monitors - such as 810 x 1080. However it will mean redoing your screens since you based it on the higher resolution :(

majike
Regular
Posts: 34
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Re: Black Interior Border in Windowed Mode

#3 Post by majike »

kivik wrote: Sat Apr 21, 2018 5:34 am It's to do with your unusual resolution and aspect ratio.

My guess is, since you've specified a higher resolution than your screen, and when it resizes down to your screen resolution (and mine, due to the height), it's rendering a black border to maintain the ratio you've specified, but since it's higher resolution than your monitor the border is sub-1 pixel, but still there - so it's rendered as a 1 pixel border.

If you change it to 1531 width the border appears at the top instead.

My recommendation is to use a lower resolution that falls within the boundaries of standard monitors - such as 810 x 1080. However it will mean redoing your screens since you based it on the higher resolution :(
The problem still seems to occur (just on the right side of the screen) when I change the screen resolution to 768x1024 and again when changed to 700x980. :(

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Black Interior Border in Windowed Mode

#4 Post by kivik »

Oh dear! What's your monitor's resolution?

I was able to fix it with 810x1080 which is within my screen's resolution - and trying both your resolution settings worked for me as well, on Mac and on Windows.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Black Interior Border in Windowed Mode

#5 Post by Imperf3kt »

Did you account for the borders of the python window your game runs inside?

I couldn't find the entry in the documentation, but there is a section in it dealing with this exact issue.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

majike
Regular
Posts: 34
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Re: Black Interior Border in Windowed Mode

#6 Post by majike »

kivik wrote: Sun Apr 22, 2018 3:20 pm Oh dear! What's your monitor's resolution?

I was able to fix it with 810x1080 which is within my screen's resolution - and trying both your resolution settings worked for me as well, on Mac and on Windows.
How curious. I'm quite keen on using 768x1024 or 1536x2048, so that they are the correct aspect ratio and the right (or compatible) resolution for iPads held vertically. I have tried using single-colour PNGs and a straight-up hex code, so it seems really peculiar why it seems to be having trouble on my 1080p computer. Even tried updating to the latest version of Ren'Py, at the risk of some old code potentially becoming invalidated.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]