Ask here your questions to get help using GDevelop.
By AnimatedG
#64651 Hi guys,

Here's another strange problem i'm encountering.

My stages are made at resolution of 720 X 1280

Am trying to full screen it but that causes stretching.

Changing the window size under action to 1920 X 1280 (with extended window) causes the stage be pushed to the left side. Any way to centre the stage?

It also causes the game to go crazy which does not happen on preview or non window size changed compiles
Eg, all explosions are stuck to one particular object instead of the correct instance object.
All enemies not taking damage. Etc

Please ignore this. It was caused by my own stupidity XD
Any help will be much appreciated. Thanks :)

User avatar
By ddabrahim
#64820 Maybe I misunderstand the problem but let me show you this.
screenshot.PNG (8.59 KiB) Viewed 18 times

What you see on the image is a game made with a certain screen size in mind then I decided to changed to a higher size which gives me the extra space you can see around the background. GDevelop can handle this two ways. When you change the size you can either choose to stretch the game to fit the size which is going to obviously stretch the game or you can choose to set the camera size to be the same as the window size in which case you get this extra space on the right which might look like "shifted" your game to the left but really the camera size is bigger so you have more of the scene visible. Because the origin point of the camera is at the top left corner, when you increase the size, it is increasing from the top left corner so this is why it might look like the game is "shifted" to the left but really, it is not. Only the camera size is bigger.

The best way to handle this is to design your game scene with the possible highest screens size you plan to support so it need to scale down to smaller size instead of stretch to higher, this way your game can look good on most screen sizes, but yes in case someone run it at higher resolution than you ever anticipated it will stretch. There is nothing you can do about that. To draw a 100x100 sprite at 120x150 it need to stretch or more of the space around the sprite need to be visible.

What you can also try to play with is to change the camera zoom and camera offset on different resolutions to minimize how much of the scene is visible to the player if you don't want to stretch your game, but then you need to count with that when you designing your level and move the camera.