Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

support for 1080p resolution + WP8.0/8.1 compatibility questions
Started by whammy Jul 06 2014 02:56 AM

10 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

Joshua,

 

There are 3 more things that came to my head:

 

1.

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.

 

2.

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?

 

3.

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!



[TOPIC: post.html]
#2

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

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.



[TOPIC: post.html]
#3

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

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?



[TOPIC: post.html]
#4

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

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.



[TOPIC: post.html]
#5

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

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 :)



[TOPIC: post.html]
#6

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

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.


[TOPIC: post.html]
#7

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

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.



[TOPIC: post.html]
#8

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

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

[TOPIC: post.html]
#9

Corey Goff

[GLOBAL: userInfoPane.html]
Corey Goff
  • Observer

  • 2 posts
  • Corona SDK

@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



[TOPIC: post.html]
#10

whammy

[GLOBAL: userInfoPane.html]
whammy
  • Contributor

  • 202 posts
  • Corona SDK

@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.

[TOPIC: post.html]
#11

Corey Goff

[GLOBAL: userInfoPane.html]
Corey Goff
  • Observer

  • 2 posts
  • Corona SDK

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.




[topic_controls]
[/topic_controls]