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 » Thu May 19, 2016 11:06 am

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: 1941
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: mobile screen sizes.

Post by Nixola » Thu May 19, 2016 11:24 am

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: 2898
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: mobile screen sizes.

Post by slime » Thu May 19, 2016 4:02 pm

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: 1182
Joined: Sat Mar 31, 2012 5:18 am
Location: Cambridge, UK
Contact:

Re: mobile screen sizes.

Post by Davidobot » Thu May 19, 2016 4:55 pm

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?
My projects: Raycaster, love.js v11.3 port
itch page: link
My website: link
My library: LovelyMoon

User avatar
slime
Solid Snayke
Posts: 2898
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: mobile screen sizes.

Post by slime » Thu May 19, 2016 7:55 pm

Not at the moment - SDL on Android isn't capable of that yet.

User avatar
4aiman
Party member
Posts: 248
Joined: Sat Jan 16, 2016 10:30 am

Re: mobile screen sizes.

Post by 4aiman » Sat May 28, 2016 9:39 pm

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: Bing [Bot], Jeeper and 21 guests