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.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

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

Post by josefnpat »

Jasoco wrote:If Löve really does just display pixels on a 1:1 ratio, then I'm glad I'm building in support for changing window scaling and stuff for future projects. Not that it would help current projects.
This seems to be an issue, even for lots of love games nowadays.

We ought to consider pushing this into the actual love framework instead of just supplying a lua library. I mean, we already did it with LuaSocket, why can't we get a LuaScale going or something?

Also, speaking of scale, I don't see a scale library available on the wiki. Is your [Jasoco] scale library open source?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Jasoco
Inner party member
Posts: 3725
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 assume that since the Retina display tells the Löve app to display at its normal size doubled up that if you were to get the screen's width and height from within Löve, it would be returned at whatever the "perceivable" resolution is. In these cases, 1280x800 and 1440x900 and 1680x1050 etc. Instead of the full resolution it's using. I'd have to have my own hands on a machine to test it for real though. I do plan on most likely getting one, but it won't be for a few weeks at least before I can even order it. (They have a long shipping time too.)

I'd be interested to see what getModes() returns for this machine. Would it return the non-doubled resolutions, or actual pixel resolutions, and would the highest end be an option. (i.e. the maximum resolution of 2880x1800.)

Can't wait to play around with one.
User avatar
Jasoco
Inner party member
Posts: 3725
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 finally got to play around with one. It is nice. And yes, currently non-Retina apps will appear completely blocky as in 2x2 sized pixels for the entire application including the titlebar for some strange reason. (The part you'd think would be part of the OS Windowsystem.)

So my proposal for Löve Retina at least at first is to update the application to be Retina for the window frame, but have the drawing area of the window remain at the 2x scaling that non-Retina apps have.

If I understood the WWDC videos correctly, the person coding the OS X version of Löve should be able to make it so everything in the app excluding the area where the game is drawn display at Retina while keeping the drawing area 2x. I hope I explained that correctly.

At least then it would still look right across platforms, but would still benefit from OS X's Retina. Then in the future when retina HiDPI displays are norm, take it from there with the ability to draw 1:1 pixels.

Sorry I didn't install Löve on the machine. I really wish I had. But I didn't have time to also create a simple lua file to test with. So I'll wait until I get my own machine in a few weeks hopefully. If I do.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

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

Post by bmelts »

It'd be nice if I could just follow Apple's guidelines for Retinization(?). Unfortunately, SDL handles all our windowing, and hacking SDL to work with retina displays just missed the cutoff on my "Top 10 Fun and Exciting Programming Projects" list.

But seriously. This is a non-trivial endeavor, thanks to our use of SDL; I'm not saying it's not doable, but it's a lot of effort for very little payoff at present. Hopefully, by the time Retina displays are more prevalent, SDL 2 will have been finally released with Retina support and unicorns. Or someone will at least have made a patch for them to half-work.

Or we'll have ditched SDL.
User avatar
Jasoco
Inner party member
Posts: 3725
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 »

OS X will let developers specify whether to use HiDPI on a per-object basis. So Löve, which only has one element and one frame visible to the user, would only need to specify to use Retina for the titlebar, but draw the game area normally using normal scaling mode.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

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

Post by bmelts »

Yes, I got that part. The point is, I would have to hack SDL even for that. When all that stuff is abstracted away into a library, modifying it becomes increasingly non-trivial.
User avatar
Jasoco
Inner party member
Posts: 3725
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 »

Wish I knew Cocoa, else I'd try and help you out with it. I guess the default appearance is fine for now. The pixelation isn't that noticeable and you really don't care when you're busy concentrating on a game. In time we'll work things out.
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 »

I just purchased a Macbook Pro Retina today and ran some quick tests (still learning Lua and Love, so forgive the formatting). This is what love.graphics.getMode() returns:

1: height: 1800, width: 2880
2: height: 1600, width: 2560
3: height: 1280, width: 2048
4: height: 1050, width: 1680
5: height: 900, width: 1440
6: height: 800, width: 1280
7: height: 768, width: 1024
8: height: 600, width: 800
9: height: 480, width: 640

Let me know if you guys want me to run any more tests.
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 »

I recently bought a Macbook Pro Retina and I did a getModes(). Looks like it recognizes 2880x1800 as one of the possible modes. Let me know if you want me to run any more tests.
User avatar
Jasoco
Inner party member
Posts: 3725
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 »

That's awesome.

What do you get if you use the following code to print to a console:

Code: Select all

love.graphics.setMode(0,0,false,false)
local w, h = love.graphics.getWidth(), love.graphics.getHeight()
print(w, h)
This will set the window size to and return the width and height that Löve thinks the screen currently is. (Try this out on normal "best for Retina" resolution.) I am thinking it will return 1440x900 as that is the size of the display in "units".
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 55 guests