Center Web Game When Full Screen[Fixed]/Fill Entire Screen(Stretch) On Android Mobile[Not 100% Fixed]?

Hi,

Just started working on a new game with GDevelop(we are new to this engine).
Our target platforms are Web and Android mobile.

Two questions:
(1) How do we center Web game when in full screen mode(default is it is to the left)?
(2) How do we fill entire device screen(stretch) on Android mobile?

Nice engine, we only found it yesterday!

Jesse

Hi Again,

We managed to center the game screen on Web version so that is fixed.

Still don’t understand how to stretch the game screen to fill the entire Android mobile screen?
(not maintaining aspect ratio - no black border on either side)

Any help would be appreciated, thanks!

Jesse

NOTE # 1: Changing to a 16:9 aspect ratio resolution made a big different on Android.
(still have black border left/right, but they are much smaller width)

Hello and welcome. Everyone does that differently. I like to do it in the game properties setting where I pick change width or height (depending what makes sense for the layout) to fit screen or window size and update resolution during game. This needs repsonsive ui and background and could possibly need a centering action in your events (depending on the game). Possibly other things as well depending on the game. Others like to make their game property “no changes to game size” and then use events like “activate fullscreen yes keep aspect ratio no” in their game logic to handle that. I can’t say how that works because I have never needed to do it.

Hi,

Thanks for the reply to our issue.
Been using GDevelop for 2 days now.
Our target platforms are Web and Android mobile devices.
We are nearly happy with what we have now on Android mobile.

How would be create a repeating background in the black borders(left/right) on Android mobile?
Did some research but have not seen something yet that can be implemented.
Let us know, thanks!

Jesse

Hi JesseLee, have you seen this fascinating example from @Eiklahc ? It seems amazing.

I don’t get black borders because of my settings and game design. Also I design my background for different sizes, for example if it’s one image I set up a tiled sprite background that expands or shrinks to the window size. However I did recently read a post in the same thread that Bubble is linking above. The post I was most interested in was SilverStreak’s as it is so simple and elegant an idea if you want to get rid of black bars but for some reason want it to still look framed.

1 Like