Size of the preview window is wrong


#1

OS: Windows 7
GDevelop 5 Beta 62

Short version:
The preview window’s size is defined without taking its menu bar into account. This causes the camera to see too far, and changes the aspect ratio.

Long description:
When the Play / Preview button on the ribbon is pressed, GDevelop open a preview window. This window’s size is identical to the window width and height defined in Project Manager’s Properties screen. However, at the top of the window, there’s a menu bar.
This menu bar takes up some of the space at the top. This forces the actual play area of the window to be shown slightly smaller, so that the height fits inside the window. At the same time, it changes the aspect ratio of the screen, so that the player sees slightly too far to the right.
bug - gdevelop preview window size 1.png
bug - gdevelop preview window size 2.png


#2

Go to project settings, in the bottom search for something like: “Change camera size: Horizontally to fit screen”, and change it to “No change camera size” :slight_smile:
The other options are explained here: [url]https://forum.gdevelop-app.com/t/solved-with-update-image-quality-for-large-images-in-app/14338/1]


#3

I looked into this a bit more. It turns out I had already set the option in the project settings to “No change in camera size”.

The problem is that the black border GDevelop draw doesn’t actually change when the project’s resolution is changed! So there’s a preview screen that’s 800 by 600 pixels or so, and if you change your screen size to 850 by 600, it’s off by 50 pixels.

There is a workaround - enable the Mask feature under Grid. That shows the actual screen size. I have no idea why the default rectangle doesn’t.

Thanks for the help though, I wouldn’t have figured this out without having a second look at project properties!


#4

Until it’s fixed you’ve to close and reopen the scene tab for the size change to be visible :wink:


#5

Thanks! Didn’d realize that would update it. Good to know, this can be a bit tricky to figure out!