Windows 8 Phone Landscape off screen

Discussion and feedback on Construct 2

Post » Sat Mar 16, 2013 8:06 pm

Using the base platformer template as a test to export to Windows8 phone, I edit the mainpage.xaml and make the following adjustment to set the game in landscape mode.

SupportedOrientations="Landscape" Orientation="Landscape"

But when I do this, the canvas becomes offset from the screen. I have tried all the variations of scaling and adjusting Window size to 768, 480 (My Nokia 810 resolution)


I even tried creating an HTML5 app in Visula Studio and then just using the HTML5 export from Construct2 in that but it has similare results.

I'm hoping someone has solved this already. Thanks in advance.
B
3
G
1
Posts: 4
Reputation: 908

Post » Sat Mar 16, 2013 8:23 pm

Sweet I solved it!!
In index.html change the doc ready to read like this. You have to flop the measurements that set the canvas size.

// Start the Construct 2 project running on window load.
          jQuery(document).ready(function ()
          {               
               // Create new runtime using the c2canvas
               cr_createRuntime("c2canvas");
               
               cr_sizeCanvas(jQuery(window).height(), jQuery(window).width());
          });
B
3
G
1
Posts: 4
Reputation: 908

Post » Sat Mar 16, 2013 8:25 pm

Great find. Hopefully @Ashley can get this fixed in a future version of construct.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri Aug 23, 2013 5:05 am

friends,

i found best solution

index.html (landscape)

...
     <style type="text/css">
...
/* cranberrygame start */
@-ms-viewport {
width: device-width;
}
/* cranberrygame end */
</style>
...

http://css-tricks.com/snippets/javascript/fix-ie-10-on-windows-phone-8-viewport/

B
57
S
19
G
79
Posts: 770
Reputation: 45,109

Post » Fri Aug 23, 2013 7:00 am

Doesn't the browser object already give you the ability to specify landscape or portrait in your project?
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428


Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, Aphrodite, Eisenhans, R0J0hound and 16 guests