Pixel-perfect scaling on an iPad Pro

Hey folks

I’m trying to create an OpenFL application for an iPad Pro, and I’m having some strange scaling issues.

Currently I have some hitzones over content that are set out using pixel measurements, and some full-screen PNG content. When I run on desktop via Neko, everything looks OK, but on the Ipad Pro some weird scaling kicks in - the placement of my objects goes slightly off, and my PNG’s start to look pixellated (the actual files are the precise right size for the screen).

Can someone point me at recommended project.xml/scaling settings to stop any scaling happening? I just want a 1:1 app running on this one specific device, it doesn’t need to work anywhere else.

Thanks! :slight_smile:

Are you trying to support the full resolution, or do you want to use a smaller window size, upscaled for the device? Do you get any Event.RESIZE events, and do you handle them? Which version are you using?

Hey Joshua! Long time no speak. How are you? :slight_smile:

I’m trying to run full screen on an iPad Pro only (it’s for an exhibition). My application is precisely the right size, when I test it via Neko it’s correct. The images in it are precisely the size of the full screen display and are very crisp (lots of text etc).

What I’m seeing on the iPad only is my images looking very pixellated, and some of my element placement is off, as if it’s scaling up from something small, rather than outputting at full resolution.

I assume it’s something to do with DPI settings etc, but I’m unsure. Basically all I want is 1:1 pixel perfect full screen on the device, no scaling or anything - it only needs to run on this device.

Using the latest versions of everything. I’ve tried hardcoding the resolution in project.xml, and also removing it entirely as I know this is how you’re supposed to do it, but I get the same results. I also experimented with NO_SCALE/EXACT_FIT in the code and didn’t see any change.

Any help on this would be enormously appreciated!


Hey :slight_smile:

Would you mind trying the latest GIT version of Lime and OpenFL? I wonder if they will behave differently.

Are you on the OpenFL Slack chat?

Not any more, it was a little noisy and I’ve not used OpenFL for a while!

I’m on lime 2.9.1 and I’ll update openfl now, I can’t test until I get back to the device tomorrow, it’s in the office.

I’d have thought this was a reaaaasonably simple thing to do though, I just want zero scaling/resizing!!

We have a new renderer on Github, which is simpler to track down – it has stage scaling built in, if you were trying to use a new resolution. Anyway, it’s good for a sanity check – if it is not fixed in the new code already, we’ll be able to fix it pretty quickly I think :slight_smile:

Awesome, I’ll try and report back tomorrow when I have my hands on a device. Thanks!

OK, no luck at all. I’ve had to use 2.9.0 due to an unrelated bug, but nothing changed anyway.

Can anyone assist with this? it’s got to be a combination of settings, surely?

OK, I’m not exactly sure what I changed but now things are working! Will dig a little deeper and try to find out what kicked it into life, I’ve been noodling a lot with it.

Current settings are NO_SCALE in the code, and the expected width and height of zero in the project settings - this was definitely not working last time but I’ve been screwing around a lot with Haxe versions etc.

Ghost in the machine? Cosmic rays? User error? Stay tuned to find out!

This is still not working, false alarm.

Can anyone please assist with this? I have four literally finished iPad apps that are failing to scale correctly on iPad Pro, and I’m tearing my hair out.

I have tried every possible combination of project.xml settings and StageScaleMode/StageDisplayStage, and nothing works. The projects run on iPad Pro, but at the wrong resolution, so scaled instead of crisp 1:1.

I’m at the point where I’m considering literally offering someone money to help fix this.

Just to help us understand what’s going on, what are stage.stageWidth and stage.stageHeight when you test this? And what should they be?

I’m trying to get some measurements out (I don’t have the device right now, I’m just sending builds until I get it back - very difficult arrangement!)

It looks like it’s snapping to none-retina though, based on where the button placements are.

Tentatively had some success with a small test app, setting fullscreen to true in project.xml and using NO_SCALE in the code, but waiting to confirm.

OK confirmed that’s working - I had to downgrade to Lime 2.9.0 for it to work, I’m not sure where the error was. Additionally I set NO_SCALE in the code and “0” for width and height as usual.

What a frustrating process!

I now get a consistent crash on iOS but I believe that’s unrelated.

Stand down y’all, thanks!