I’m totally new to GDevelop. As a starter project I created a little quiz for my work within a few hours. Almost everything went fine and I really start to like Gdevelop.
However I am now encountering a problem and I don’t know how to solve it. I uploaded my game on a webspace and tested it on my PC (everything was looking good there) and also on mobile devices. The width of my text objects changes on mobile devices and makes some of the text disappear behind my buttons. You can see the problem on the bottom of this post.
I chose a resolution of 640x960 and selected “no changes to game size” in Project properties. Why are the textboxes not looking as expected?
Thank you for your help!
Left side is a screenshot of my PC and right side is a screenshot from my smartphone where the text looks different as expected.
I don’t know the reason, but a workaround could be to adapt the font size to the screen size
I think “No changes to game size” means you’re not scaling at all. So since your phone is a lower resolution than your PC, it is basically “zooming in” on your game content.
I’d try to change that setting to “Fit to Width” and see if that does what you want, or keep “No Changes to Game Size” but check the update resolution.
Thank you both for your replies.
“Fit to width” was actually the first option that I tried and it does not help with the problem. The text is still looking different compared to the PC version. And with “fit to width” the windows version of my Quiz is no longer centered in my browser window but in the left corner of my browser which even makes the problem worse.
With “No Changes to Game Size” selected I have no option option but to check update resolution. It is automatically checked.
I tried to use a normal text element instead of BBtext and the result were better (the textbox looks the same since the words are in the same lines) but there are still some issues. The font looks different. And BBText gives me much more options for my text layout.
Could it be that GDevelop uses different fonts for windows and android? The Android font seems to have more line spacing and is therefore taking more space vertically
Edit: @Tarsio I forgot to ask: How do I adapt the font size to the screen size? Is there a tutorial for that? I wasn’t able to find the option in GD.
As far as I know, if you are not providing a font file to your text Object, GDevelop doesn’t select a font at all. Your OS decides whstever the default is.
I mean something like this:
Alright, thank you for your answers. I’ll try to change the font size based on the window with.
And I will to change the font. But if my game is playable in the browser and doesn’t get installed…this means I can’t include a font in my game, right?