So the new MacBook Pro has a Retina model. Retina is a fancy name for HiDPI. Basically the OS will display things at twice its original resolution. Apps that are updated for Retina will have crisp smooth graphics. While older apps will simply have older resolution graphics stretched up to double the size. This of course is a noticeable difference apparently.
*HiDPI Primer: Basically, the OS draws everything doubled up. So instead of the menubar and titlebar being their original 22 pixel heights, they are now 44 pixels. The display has twice the resolution of a 1440x900 display. So the pixels are really small to the point they are almost imperceptible to the naked eye at normal eye distance. (Without putting your nose up to the screen.)
Obviously at some point I think the OS X version of Löve should take advantage of this. But the real question is how to handle it?
In current games, the games have access to the entire pixel resolution when in fullscreen mode. (fullscreen being a whopping 2880x1800 pixels) But of course, these pixels are TINY if you use 1:1 pixel. So games not optimized for Retina yet, like Portal 2, will have teeny tiny text when displaying anything at 1:1. (Which in Portal 2's case is just console text. The actual game and on-screen text is displayed scaled so it displays fine.) While games that are optimized, like Diablo 3, will simply scale everything smoothly but still draw at the entire resolution for a really crisp looking image.
Note: I have not tested a Retina Pro yet nor have I tested Löve on it. I plan on getting one, possibly, maybe, very soon, possibly, but maybe not, but possibly.
Now, the question is, when using love.graphics.getWidth() in FULLSCREEN, (When you set window width and height to zero) does Löve currently:
A) Return the full width of 2880, or..
B) Return the perceived width of 1440?
How does it handle diaplay when in windowed mode? Does it double the pixels up? Will a game with a size set to 640x480 display at 1280x960 and double its pixels up blurry-like?
When using love.graphics.getModes(), what does it return?
This is an interesting new technology and I can't wait to play with it. If possible, I might try and install Löve 0.8.0 on a display model to see how it works. I was wondering if anyone here on the Mac side of development had put any thought into this yet, or if any of them had one of these machines yet.
Retina MacBook Pro.... how will Löve be handled?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Retina MacBook Pro.... how will Löve be handled?
I was wondering about this myself.
I'm thinking more about performance issues, will Löve still have decent frames-per-second with the same number of things on-screen at double the resolution? (with assets that are double resolution too)
I'm thinking more about performance issues, will Löve still have decent frames-per-second with the same number of things on-screen at double the resolution? (with assets that are double resolution too)
- 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?
Well, they crammed a lot more power into the machine, but I'd love to see some benchmarks too. If I get one of them, I will gladly be a tester. I don't know anything about actually compiling or programming Löve itself, but I can at least test. I can't wait to try it out myself hopefully at the store.
Assets won't matter since it'd only be the titlebar that Löve would need to include since there's really nothing else in the standard Löve app except for the piggy.love file. It's all about how Löve handles displaying the content.
Will it display it at 1:1 pixel, which would basically make anything that's supposed to be say, 640x480, look like it's actually 320x200. Or will it incorporate 2x scaling out of the gate and scale whatever is drawn to twice what you want it to so it still appears to be the same size it should be. Or will Löve let us choose.
I'm hoping for the first, though it would cause problems for most projects since they're not made to show up bigger. Projects you make yourself could be programmed to scale bigger to compensate. But not all developers will know this. So maybe it should be option 3, which is both. I SUGGEST that by default it scales to 2x in hardware. But have an OPTION that can be set in the conf.lua file that can set it to 1:1 pixel ratio. This option would be ignored on computers/displays that don't have HiDPI, but would automatically take effect on HiDPI ones. At the very least I think Löve should double it up, but scale the graphics itself using nearest neighbor mode to prevent the smoothing. If there's one thing I learned from the N64 is that antialiasing was cool back when it was new, but in reality, it's really ugly.
But I don't know. HiDPI is new-ish. But it needs to be dealt with eventually. I'm assuming Löve just displays at doubled size which means pixels will be blurred. (Basically like if you took an image in PhotoShop and doubled its size using linear scaling.) Even though the pixels are crisply drawn, OS X would be doubling them in software via the Windowserver. This is how it handles non-Retina enabled apps. So I'd like to get Löve compatible as soon as possible.
Assets won't matter since it'd only be the titlebar that Löve would need to include since there's really nothing else in the standard Löve app except for the piggy.love file. It's all about how Löve handles displaying the content.
Will it display it at 1:1 pixel, which would basically make anything that's supposed to be say, 640x480, look like it's actually 320x200. Or will it incorporate 2x scaling out of the gate and scale whatever is drawn to twice what you want it to so it still appears to be the same size it should be. Or will Löve let us choose.
I'm hoping for the first, though it would cause problems for most projects since they're not made to show up bigger. Projects you make yourself could be programmed to scale bigger to compensate. But not all developers will know this. So maybe it should be option 3, which is both. I SUGGEST that by default it scales to 2x in hardware. But have an OPTION that can be set in the conf.lua file that can set it to 1:1 pixel ratio. This option would be ignored on computers/displays that don't have HiDPI, but would automatically take effect on HiDPI ones. At the very least I think Löve should double it up, but scale the graphics itself using nearest neighbor mode to prevent the smoothing. If there's one thing I learned from the N64 is that antialiasing was cool back when it was new, but in reality, it's really ugly.
But I don't know. HiDPI is new-ish. But it needs to be dealt with eventually. I'm assuming Löve just displays at doubled size which means pixels will be blurred. (Basically like if you took an image in PhotoShop and doubled its size using linear scaling.) Even though the pixels are crisply drawn, OS X would be doubling them in software via the Windowserver. This is how it handles non-Retina enabled apps. So I'd like to get Löve compatible as soon as possible.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Retina MacBook Pro.... how will Löve be handled?
That all depends on how osx handles this, so really, we don't know.
Re: Retina MacBook Pro.... how will Löve be handled?
Tragically, I lack a retina MBP to test anything with, but by all indications, the full pixel dimensions are reported to games, even in windowed mode. That means, of course, that games with set windowed dimensions will look half the size they might be expected to.
I haven't figured out how I want to handle things in LÖVE yet, though. I've been considering pulling an Apple, more or less, and checking for retina-ness and automatically doubling pixel dimensions if so, but that'll really uglify the code having *LOVE_RETINA_MULTIPLIER everywhere. If we do go with automatic doubling, though, I'll probably follow Apple's guidelines and transparently load any @2x images included in the .love, and scale up any images without a doubled counterpart.
Of course, in the upcoming release of OS X Apple has a new OpenGL helper framework that would largely handle this transparently for us, but that can't be relied on for previous versions...
I haven't figured out how I want to handle things in LÖVE yet, though. I've been considering pulling an Apple, more or less, and checking for retina-ness and automatically doubling pixel dimensions if so, but that'll really uglify the code having *LOVE_RETINA_MULTIPLIER everywhere. If we do go with automatic doubling, though, I'll probably follow Apple's guidelines and transparently load any @2x images included in the .love, and scale up any images without a doubled counterpart.
Of course, in the upcoming release of OS X Apple has a new OpenGL helper framework that would largely handle this transparently for us, but that can't be relied on for previous versions...
- 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?
I can't wait to test it out myself. Sadly the store won't be getting them in for a while for reasons I mentioned above. Though I could just driiiiiive all the way to the Lehigh Valley Mall Apple Store, but it's just so far away.
- 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?
Ouch. Let's hope it doesn't have to come to that.bmelts wrote:That'll really uglify the code having *LOVE_RETINA_MULTIPLIER everywhere.
When I write def I mean function.
- 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?
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.
But if I were the Löve people I'd build in a detection system that by default displays the graphics at 2x with nearest neighbor but include a configuration option to override how Retina is handled. This way by default new Retina owners won't be confused and probably won't even notice a difference since to them it would look exactly like it did on their old display. Don't bother requiring users to include @2x files. There's no reason to. This should be handled seamlessly by Löve itself but allow further handling by the coder creating the game.
Anyone get a chance to check one of these out yet? I really hope I can test Löve when I go in to take a look whenever I am able to. And I hope that's soon.
But if I were the Löve people I'd build in a detection system that by default displays the graphics at 2x with nearest neighbor but include a configuration option to override how Retina is handled. This way by default new Retina owners won't be confused and probably won't even notice a difference since to them it would look exactly like it did on their old display. Don't bother requiring users to include @2x files. There's no reason to. This should be handled seamlessly by Löve itself but allow further handling by the coder creating the game.
Anyone get a chance to check one of these out yet? I really hope I can test Löve when I go in to take a look whenever I am able to. And I hope that's soon.
- 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?
Thanks to the help of a NeoGAF member I can report that Löve simply displays its graphics at nearest neighbor 2x2 pixels.
1440x900 HiDPI 1680x1050 HiDPI
1440x900 HiDPI 1680x1050 HiDPI
Re: Retina MacBook Pro.... how will Löve be handled?
Well, that's interesting. How does it handle fullscreen mode?
Working with this to support hi-res images and such should be... "fun".
Working with this to support hi-res images and such should be... "fun".
Who is online
Users browsing this forum: Ahrefs [Bot] and 20 guests