Screen resolution?

A project to port LÖVE to Android handhelds
Locked
User avatar
sefan
Prole
Posts: 23
Joined: Fri Jul 31, 2015 7:03 am
Contact:

Screen resolution?

Post by sefan »

Hi, What screen resolution would you recommend for an android game?
I mean the resolution i shall make all images and stuff for. I know i need to scale it when i install it on the phone/pad.
Sefan.se GitHub.com Itch.io
Looking for help on graphics/music/sound effects. PM me if interested.
peppage
Prole
Posts: 1
Joined: Tue Dec 15, 2015 3:49 am

Re: Screen resolution?

Post by peppage »

I think they are making 4K screens now so 3840 × 2160 is probably suggested. You need to be careful because there is a size limit
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Screen resolution?

Post by Karai17 »

4k is really bad advice. The vast majority of Android phones are running at 720-1080p with a few high end 1440p devices and a few bleeding edge devices with 4k.

You should probably target 1080p, or have multiple assets for 1440, 1080, and 720.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
teeter11
Prole
Posts: 27
Joined: Sun Jan 12, 2014 8:48 pm

Re: Screen resolution?

Post by teeter11 »

Make your app work on ALL resolutions and "scale" the things you draw. This is how they do it in the ROBLOX engine which is what i am going to call it.

Not to be confused with love.graphics.scale as it is not the same

Heres a basic example of scaling:

Code: Select all

function love.load()

love.window.setMode(0,0,{resizable = true,vsync = false}) --setting the size to 0,0 will set it to the complete size of your screen

windowX,windowY = love.graphics.getDimensions()

end

function love.draw()

love.graphics.print("Example",(windowX*.5),(windowY*.5)) -- Prints the text in the middle of the screen (to make it perfect you must subtract half the X and half the Y or even more)

end

function love.update()

windowX,windowY = love.graphics.getDimensions() -- updates the dimensions every frame

end
Last edited by teeter11 on Tue Jan 05, 2016 1:56 pm, edited 2 times in total.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Screen resolution?

Post by Karai17 »

That code has nothing to do with scaling. You're just positioning things relative to the size of the screen.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Locked

Who is online

Users browsing this forum: No registered users and 1 guest