Page 1 of 1

mobile screen sizes.

Posted: Thu May 19, 2016 11:06 am
by ozergul
hi,
I really liked love2d and I wanna publish my game to android, ios.

but I couldnt find anything about mobile screen. My game will be horizontal.

where is the settings for mobile?

Re: mobile screen sizes.

Posted: Thu May 19, 2016 11:24 am
by Nixola
LÖVE on Android is horizontal (landscape) by default if I recall correctly.

Re: mobile screen sizes.

Posted: Thu May 19, 2016 4:02 pm
by slime
On iOS the aspect ratio of the window size you specify determines the game's orientation (the actual window size will be based on the screen size though) - and if your window has the resizable flag set to true, it will auto-rotate based on the orientation of the device.

Re: mobile screen sizes.

Posted: Thu May 19, 2016 4:55 pm
by Davidobot
slime wrote:On iOS the aspect ratio of the window size you specify determines the game's orientation (the actual window size will be based on the screen size though) - and if your window has the resizable flag set to true, it will auto-rotate based on the orientation of the device.
Does this apply to the android version too?

Re: mobile screen sizes.

Posted: Thu May 19, 2016 7:55 pm
by slime
Not at the moment - SDL on Android isn't capable of that yet.

Re: mobile screen sizes.

Posted: Sat May 28, 2016 9:39 pm
by 4aiman
There's no settings for mobile for Android - the whole screen will be used and the game will be horizontal. (Unless you've change the love itself).

The best practice would be creating a game that can be viewed on any screen.

It's not that hard. Just write your game for one resolution and then scale it all to fit the screen.
Say, you wrote a game for 320*240 screen (not widescreen, just 4:3).
Say, actual size is 800*480.
Now just get the multiplier by dividing 480/240 and scale everything by that amount (both x and y).

If you wrote a widescreen game then it would be wise to get an X-axis multiplier too.

There are more than one way of scaling and it all depends on how you've done your game.
Try https://love2d.org/wiki/love.graphics.scale for starts.