Retina MacBook Pro.... how will Löve be handled?

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.
Ranma13
Prole
Posts: 4
Joined: Tue Jul 31, 2012 8:21 am

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Ranma13 »

Tried it out and you were right! It returned 1440x900.
madman
Prole
Posts: 2
Joined: Thu Jan 10, 2013 3:02 pm

Re: Retina MacBook Pro.... how will Löve be handled?

Post by madman »

Hi all, I'm a new Lover, and just catching up on this retina thread. Has someone managed to run a windowed app with the correct high-density/retina mode? In full screen no problem at all. I've read on the SDL forums that they were still working on it (decoupling points from pixels) so Love might be waiting for an SDL patch?

Thanks for all the good work!
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Retina MacBook Pro.... how will Löve be handled?

Post by T-Bone »

Löve shouldn't depend on the resolution of the screen. You can, just like you can with any other computer or screen, check what full screen modes are supported at run time. Just don't write resolution dependent code, that never makes sense.
madman
Prole
Posts: 2
Joined: Thu Jan 10, 2013 3:02 pm

Re: Retina MacBook Pro.... how will Löve be handled?

Post by madman »

But in windowed mode, it still doesn't solve the retina problem. The Macbook Pro has a resolution of 2880x1800, but retina apps are expected to see it as 1440x900 (one point == 4 pixels). So two scenarios:

• full screen: if you set your LÖVE app to the first mode returned by getModes(), 2880x1800, it effectively uses all the pixels (although with no virtualization, your game has to zoom in the fonts by 2, and so on...)
• windowed: if you set your app to the first mode, still 2880x1800, then it creates a gigantic window that's 4 times your screen... not usable.

So I'm fine with how the full screen behaves, but for the windowed mode, it's just off. I know the SDL guys are working on something to patch that, but I was just wondering if someone on the LÖVE side was looking at that.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Retina MacBook Pro.... how will Löve be handled?

Post by kikito »

I would not count on that. It seems to me that the intersection of people using retinas and LÖVE is very small. You might as well be the only member of that set.
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Jasoco »

I am going to have to agree that it seems best to just keep it as it is, at least for a while. There's no easy way to account for both and make it smooth enough for the game creator to account for both as well. I mean what if the developer makes a game with Löve set to Retina mode but doesn't take into account people with normal displays. Or they don't put in a mode for Retina. The only games Retina mode would benefit in are ones where the graphics are high resolution and the game scales down to accommodate other resolutions. Which are few and far between unless you're Jonathan Blow and just created Braid.

But as Ranma13 mentioned above, Löve WILL return the highest native resolution as an option for Fullscreen so if you want to code your game to be independent of resolution, there you go. Just use Fullscreen. Then you can use the full 2880x1800 or whatever of your shiny Retina display.

But I know what you mean, madman. I was wondering how Löve handled this myself. If you're windowed and set the width and height to what Löve thinks is the native, it's going to actually be twice the width and height because of how Retina works. But there's no real way to account for this other than either Löve checking the computer, seeing if it's Retina, and returning a half max size when windowed or the developer putting in many many options for controlling window size and such.

The only thing I would ask is that Löve for OS X have a simple "love.graphics.isRetina()" call that would return true or false that the developer, if they want to be able to account for it, can then use accordingly. It would probably be trivial to implement and could just return false on other platforms. It wouldn't need to actually do anything other than return the true or false. To the end user it wouldn't matter. But to the developer who wants to cover all bases, it would be very useful. (As you could program the game to run one size when windowed making sure to not go higher than the actual screen size in units, and take up the full resolution when fullscreen.)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Robin »

Jasoco wrote:The only thing I would ask is that Löve for OS X have a simple "love.graphics.isRetina()" call that would return true or false
love.graphics.isSupported("retina")?
Help us help you: attach a .love.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Jasoco »

Robin wrote:
Jasoco wrote:The only thing I would ask is that Löve for OS X have a simple "love.graphics.isRetina()" call that would return true or false
love.graphics.isSupported("retina")?
Exactly. It would only matter to the people who want to deal with it, and wouldn't matter at all in the slightest to anyone else.
Sp1k3
Prole
Posts: 20
Joined: Mon Jan 14, 2013 7:32 am

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Sp1k3 »

bmelts wrote:Well, that's interesting. How does it handle fullscreen mode?

Working with this to support hi-res images and such should be... "fun".
Especially given the Intel graphics of the new MBP lol good luck getting 60 FPS in anything complicated
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Retina MacBook Pro.... how will Löve be handled?

Post by Jasoco »

Sp1k3 wrote:
bmelts wrote:Well, that's interesting. How does it handle fullscreen mode?

Working with this to support hi-res images and such should be... "fun".
Especially given the Intel graphics of the new MBP lol good luck getting 60 FPS in anything complicated
I would love to have a chance to test one with my project at full screen resolution.
Post Reply

Who is online

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