mobile screen sizes.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
ozergul
Prole
Posts: 11
Joined: Sat Apr 23, 2016 8:08 am

mobile screen sizes.

Post 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?
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: mobile screen sizes.

Post by Nixola »

LÖVE on Android is horizontal (landscape) by default if I recall correctly.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: mobile screen sizes.

Post 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.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: mobile screen sizes.

Post 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?
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: mobile screen sizes.

Post by slime »

Not at the moment - SDL on Android isn't capable of that yet.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: mobile screen sizes.

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 150 guests