support for 1080p resolution + WP8.0/8.1 compatibility questions

Joshua,

There are 3 more things that came to my head:

I read that WP started supporting 1080p, but In my WPAppManifest.xml file where I can select supported resolutions, there is a max of 720p and there’s even no choice for 1080p. Is there a way to support 1080p as well? I’m not sure how it would behave when running on a hardware full HD device but when I test the app on 1080p emulator it returns display.pixelHeight = 1280p, so I guess that on the hardware device it would be the same, and it won’t load my full HD assets.

Also - how is it with the WP8.0 / 8.1 compatibility of CoronaCards? I’m testing my game on WP 8.1 hardware device and it deploys correctly, but I can see that next to my solution’s name it’s written “Windows Phone 8.0”, so it shouldn’t run on 8.1 system… I’m also able to run the game on both 8.1 and 8.0 emulators. Will it run on both systems on hardware devices as well?

Since it’s a WP8.0 solution, should I implement a Live Tile for 8.0? On the other hand I’m targeting and testing on the 8.1 device. There’s a slight difference in how to do it for 8.0 and 8.1. 

Let me know your thoughts, please. 

Thanks!

I unfortunately don’t have answers to most of these questions because I’m fairly new to Windows Phone 8.1 as well.  I do know that Windows Phone 8.0 built *.xap applications are supported on Windows Phone 8.1 devices.  Most of our testing has been on 8.0 devices and very little testing has been done on 8.1 at the moment other than to confirm that they work (quick baseline test).  The key thing here is that we do *not* want to build for Windows Phone 8.1 and create *.appx applications because those type of apps are *.not* supported on Windows Phone 8.0 devices, which are the dominant ones in the Windows Phone market right now.

Regarding tiles, since 8.1 is backward compatible with 8.0 apps, my understanding is that you should continue to use 8.0 style tiles.

I see, but 1080p is also supported by WP8.0. Do you think there is a way to add this resolution support to a CoronaCards solution?

This may just be a limitation of the Visual Studio 2012 editor.  You may be able to add 1080p support to the xml file yourself by hand editing it.

I’m using the latest update Visual Studio 2013, but maybe the WP8.0 solution determines supported resolutions. I’ll try to figure it out.

Anyway - I got a Live Tile working and updating itself with the actual game score, yay! I’m saving the score text file in lua and read it on application exit in c#, so just like Lerg suggested.

Unfortunately for twitter sharing and IAPs I’ll need to have the events sending communication, so I still look forward for a communication wrapper from you :slight_smile:

OK, so it seems that we don’t need to declare the 1080p resolution:

 

1080p support is implemented as up-scaled 720p. Therefore an application must have the 720p support declared in the application manifest file (WMAppManifest.xml) for the app to be deployed on a device with 16:9 aspect ratio. Note that there is no dedicated value for 1080p resolution.

 

But I’m curious whether my config.lua conditions based on display.pixelHeight parameter will apply or not. When testing on 1080p emulator I get display.pixelHeight = 1280. 

 

Does display.pixelHeight = PhysicalScreenResolution Property?

If it does, then probably on a physical device it will return 1920 instead of 1280 like it does on 1080 Emulator.

Corona currently calculates screen pixel width/height in C# as follows…

var content = System.Windows.Application.Current.Host.Content;

double pixelWidth = (content.ActualWidth * (double)content.ScaleFactor) / 100.0;

The above is the algorithm recommended by Microsoft.  I’ve confirmed that this returns the correct pixel width and height for my devices that are not 1080p.  Attempting to fetch pixel width/height via DeviceExtendedProperties.TryGetValue(“PhysicalScreenResolution”, …) always fails for me (provides null) on the devices I’ve tested with.

I did a quick Internet search and it looks like you have to go out of your way to fetch the pixel width/height from a 1080p device.  Perhaps it’s some kind of backward compatibility thing?  Anyways, someone figured it out here…

   http://www.pedrolamas.com/2013/11/06/handle-1080p-in-windows-phone-like-a-pro/

So, what the guy is saying in the above post is that Microsoft’s XAML framework’s scale factor maxes out at 720p and won’t return the true scale factor for a 1080p device.  So, it’s another thing to add to my to-do list.

OK, so I gues I’ll support 720p for now. Thanks for the info.

@Whammy, it looks like you already found what you were looking for but to confirm having 720p is all you need to do to support 1080p devices.

In order to maintain backwards compatibility with existing apps, 1080p devices appear \ *as if they are 720p *. The platform performs an additional 50% scale-up to get the full 1080p resolution but it isn’t exactly a bitmap stretch from 720 to 1080. The platform actually renders text and graphics at the full 1080p resolution. It is just the XAML layout that is computed at 480x853.

Nokia put out resolution detection code that you can reference: http://developer.nokia.com/resources/library/Lumia/how-to-adapt-to-lumia-phone-hardware-features/optimising-for-large-screen-phones/resolution-specific-considerations.html

@Corey, I don’t believe that upscaling a 720p image and bitmap fonts to 1080p will have a super sharp look. I think it’d be better if we had an option to detect 1080p resolution to chose full HD assets, but I’m leaving it as it is for now. Thanks for the info.

Correct - controls and lay-out will be scaled up as well as images and other assets. However apps or in this case the SDK, can detect the true resolution and load higher res images/assets accordingly. I believe Josh is going to work on this soon.

I unfortunately don’t have answers to most of these questions because I’m fairly new to Windows Phone 8.1 as well.  I do know that Windows Phone 8.0 built *.xap applications are supported on Windows Phone 8.1 devices.  Most of our testing has been on 8.0 devices and very little testing has been done on 8.1 at the moment other than to confirm that they work (quick baseline test).  The key thing here is that we do *not* want to build for Windows Phone 8.1 and create *.appx applications because those type of apps are *.not* supported on Windows Phone 8.0 devices, which are the dominant ones in the Windows Phone market right now.

Regarding tiles, since 8.1 is backward compatible with 8.0 apps, my understanding is that you should continue to use 8.0 style tiles.

I see, but 1080p is also supported by WP8.0. Do you think there is a way to add this resolution support to a CoronaCards solution?

This may just be a limitation of the Visual Studio 2012 editor.  You may be able to add 1080p support to the xml file yourself by hand editing it.

I’m using the latest update Visual Studio 2013, but maybe the WP8.0 solution determines supported resolutions. I’ll try to figure it out.

Anyway - I got a Live Tile working and updating itself with the actual game score, yay! I’m saving the score text file in lua and read it on application exit in c#, so just like Lerg suggested.

Unfortunately for twitter sharing and IAPs I’ll need to have the events sending communication, so I still look forward for a communication wrapper from you :slight_smile:

OK, so it seems that we don’t need to declare the 1080p resolution:

 

1080p support is implemented as up-scaled 720p. Therefore an application must have the 720p support declared in the application manifest file (WMAppManifest.xml) for the app to be deployed on a device with 16:9 aspect ratio. Note that there is no dedicated value for 1080p resolution.

 

But I’m curious whether my config.lua conditions based on display.pixelHeight parameter will apply or not. When testing on 1080p emulator I get display.pixelHeight = 1280. 

 

Does display.pixelHeight = PhysicalScreenResolution Property?

If it does, then probably on a physical device it will return 1920 instead of 1280 like it does on 1080 Emulator.

Corona currently calculates screen pixel width/height in C# as follows…

var content = System.Windows.Application.Current.Host.Content;

double pixelWidth = (content.ActualWidth * (double)content.ScaleFactor) / 100.0;

The above is the algorithm recommended by Microsoft.  I’ve confirmed that this returns the correct pixel width and height for my devices that are not 1080p.  Attempting to fetch pixel width/height via DeviceExtendedProperties.TryGetValue(“PhysicalScreenResolution”, …) always fails for me (provides null) on the devices I’ve tested with.

I did a quick Internet search and it looks like you have to go out of your way to fetch the pixel width/height from a 1080p device.  Perhaps it’s some kind of backward compatibility thing?  Anyways, someone figured it out here…

   http://www.pedrolamas.com/2013/11/06/handle-1080p-in-windows-phone-like-a-pro/

So, what the guy is saying in the above post is that Microsoft’s XAML framework’s scale factor maxes out at 720p and won’t return the true scale factor for a 1080p device.  So, it’s another thing to add to my to-do list.

OK, so I gues I’ll support 720p for now. Thanks for the info.

@Whammy, it looks like you already found what you were looking for but to confirm having 720p is all you need to do to support 1080p devices.

In order to maintain backwards compatibility with existing apps, 1080p devices appear \ *as if they are 720p *. The platform performs an additional 50% scale-up to get the full 1080p resolution but it isn’t exactly a bitmap stretch from 720 to 1080. The platform actually renders text and graphics at the full 1080p resolution. It is just the XAML layout that is computed at 480x853.

Nokia put out resolution detection code that you can reference: http://developer.nokia.com/resources/library/Lumia/how-to-adapt-to-lumia-phone-hardware-features/optimising-for-large-screen-phones/resolution-specific-considerations.html

@Corey, I don’t believe that upscaling a 720p image and bitmap fonts to 1080p will have a super sharp look. I think it’d be better if we had an option to detect 1080p resolution to chose full HD assets, but I’m leaving it as it is for now. Thanks for the info.