WP8 landscape mode for Construct2 game?

Get help using Construct 2

Post » Wed Jun 19, 2013 7:06 am

Hi all,

I just made my first game in Construct2, and it runs great in all web browsers on my desktop, and various mobile platforms, including iPhone, iPad, Android smartphones and tablets.

I exported it as a Win8 app, and just submitted it to the Windows store.

I just installed the WP SDK, with the intention of publishing it on WP8. However, the game appears horizontal while in portrait mode, when I run it in the Simulator.

When I rotate the Simulator 90 degrees so that the phone is horizontal, the game rotates with it, and appears perpendicular to the landscape screen.

How do I make my Construct2 game run in landscape mode in the WP8 simulator in VS2012?




B
8
S
1
Posts: 6
Reputation: 664

Post » Thu Jun 20, 2013 3:35 am

I found the complete answer in a couple of different places:

http://www.scirra.com/forum/force-landscape-windows-phone-8_topic61174.html

I was able to successfully force landscape mode in Visual Studio Express 2012 for Windows Phone by doing the following:
1) Open the solution (.sln) file that is produced from the WP8 exporter
2) Open the MainPage.xaml file from the Solution Explorer
3) Find SupportedOrientation and change the value to "Landscape"
4) Find Orientation and change the value to "LandscapeLeft"

<phone:PhoneApplicationPage
...
    SupportedOrientations="PortraitOrLandscape" Orientation="LandscapeLeft"


http://www.scirra.com/forum/topic61789.html

Set the width to 800 and the height to 480 in the viewport meta of the exported index.html.

E.g.

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi, width=800, height=480" />OnekSoftGames2013-06-20 03:36:13
B
8
S
1
Posts: 6
Reputation: 664

Post » Fri Aug 23, 2013 5:02 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/
Construct2 Cordova Plugins (currently 87 plugins): https://www.scirra.com/store/construct2 ... ugins-1662

Construct2 Prototype Capx (currently 50 capx): https://www.scirra.com/store/games-with ... -capx-3088

Home page: http://cranberrygame.com
B
65
S
22
G
81
Posts: 780
Reputation: 46,631


Return to How do I....?

Who is online

Users browsing this forum: stevenode, tarek2 and 12 guests