Porting our projects to Windows 8.1 Desktop/Tablet and Phone

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

Porting our projects to Windows 8.1 Desktop/Tablet and Phone

Postby 3DRoberto » Fri Jun 06, 2014 8:57 pm

This tutorial attempts to describe the process of how the Jemchicomac team has ported the Crazy Belts game (developed in LibGDX) to Windows 8.1 Desktop, Tablet or Phone.

Preparations in Eclipse

If we open the file index.html we can see that the JS files are included inside of a directory named *.GwtDefinition.

Image


1. We make sure to delete all *. Cache.js files in that directory (if any).

Image


Compiling the LibGDX HTML Version

2. Instead of using "SuperDevmode" through of Run_As .. Java Application & Run_As.. Web Application, we compile with GWT in final form.

Image


3. In Output style you can choose between Obfuscated, Pretty or Detailed.
In the box "additional compiler arguments" we can use the -draftCompile option for a faster compilation (only for testing).

Image


We will see the compile process and once completed the files are ready in the \war directory.

Image


Preparations in Visual Studio 2013

4. Open a new project from Visual Studio 2013.

Image


5. We are located in our work area and select Templates > Javascript > Store Apps > Universal Apps > Blank App (Universal Apps).

Image


6. Copy the files previously generated by GWT in the step 3, in the \war folder, except the \war\WEB-INF directory.

Image


7. Paste over the Shared node of our project.

Image


Being as follows:

Image


8. Open the package.appxmanifest file of the project "Windows 8.1" and in the "Start page" option replace default.html by index.html.
► IDEM for the project "Windows Phone 8.1".

Image


Running on Windows Desktop / Tablet 8.1

9. Open the default.html file of the project "Windows 8.1" and copy the lines of the WinJS scripts.

Image


10. Paste the lines in the index.html file, before of SoundManager scripts.

Image


In this moment we can perform a test.

Image


Windows App Certification Kit on Windows Desktop / Tablet 8.1

11. We completed the application assigning images in the "Visual Assets" tab.
► IDEM for the project "Windows Phone 8.1".

Image
Image
Image

Image


12. Again select the "Windows 8.1" project and open PROJECT > Store > Create App Packages..

Image


13. Select "NO" on the question and hit on "Next".

Image


14. We number our version and choose the type "Release (Any CPU)". Hit on "Create".

Image


15. Once created the files in yourProject\yourProject.Windows\AppPackages, hit on "Launch Windows App Certification Kit" in "Local machine" mode.

Image


16. Select all test and hit on "Next".

Image


We let that perform the validation of the App.

Image


Validating no are finish well.

Image


We see that the cause of errors is the encoding of the files.

Image
Image


17. We solve by opening the reported files.

Image


18. One by one we are doing "Save As." and save to "UTF-8 with signature".

Image
Image
Image


Now should pass successfully the validation of the "Windows App Certification Kit", so we repeat from step 12.

Image


Running on Windows Phone 8.1

19. Open the default.html file of the project "Windows Phone 8.1" and copy the lines of the WinJS scripts.

Image


20. Paste the lines in the index.html file, before of SoundManager scripts (replace the scripts we use in step 10 to the project of "Windows 8.1").

Image


In this moment we can perform a test if we have a phone with Windows Phone connected to PC or emulator (https://dev.windowsphone.com/en-us/downloadsdk).

Image


At this moment the error that we get from IE 11 with a Windows Phone 8.1 phone is this:

Image

From IE 11 on Windows Desktop 8.1 we not get this error.


Windows App Certification Kit on Windows Phone 8.1

21. Select the "Windows Phone 8.1" project and open PROJECT > Store > Create App Packages..

Image


22. Select "NO" on the question and hit on "Next".

Image


23. We number our version and choose the type "Release (Any CPU)". Hit on "Create".

Image


24. Once created the files in yourProject\yourProject.WindowsPhone\AppPackages, hit on "Launch Windows App Certification Kit".

Image


25. Select all test and hit on "Next".

Image


We let that perform the validation of the App.

Image


If we had done step 17 of encode the files to "UTF-8 with signature" everything should go smoothly.

Image


After executing successfully the above steps, we have our game running over our "Windows" friend 8-)
3DRoberto
 
Posts: 9
Joined: Tue Jun 03, 2014 5:51 pm
Location: Seville, Spain

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby Random Bot Games » Fri Jun 06, 2014 10:57 pm

Wow very impressive. I think we've got some serious info over here that should be ported to the Wiki.
Random Bot Games
 
Posts: 78
Joined: Fri Oct 26, 2012 1:16 pm
Location: Madrid

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby imagnity » Mon Jun 09, 2014 8:51 am

Now this is a contribution..

@3DRoberto This is simply AMAZING!!! Thank you. I believe you guys also figured out how to bind stuff like ad/iap..etc? Can't find CrazyBelts on WP store. Can you please share the link? Maybe not available in the Philippines? :(
Check out my games - http://www.imagnity.com/games/
imagnity
 
Posts: 197
Joined: Mon Mar 25, 2013 6:27 pm

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby 3DRoberto » Mon Jun 09, 2014 4:44 pm

Thanks for your appreciation :)

Crazy Belts will soon be available in the Windows Store.

I try that this tutorial appears in the Wiki, in "External tutorial" section.
3DRoberto
 
Posts: 9
Joined: Tue Jun 03, 2014 5:51 pm
Location: Seville, Spain

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby xeoshow » Tue Jun 10, 2014 8:31 am

Really very good!!
xeoshow
 
Posts: 305
Joined: Mon Mar 18, 2013 1:12 am

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby Vantrebla » Tue Jun 10, 2014 12:07 pm

Wow very nice :D thank you ;)
Vantrebla
 
Posts: 22
Joined: Tue Apr 09, 2013 7:17 am

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby davebaol » Tue Jun 10, 2014 12:39 pm

3DRoberto wrote:I try that this tutorial appears in the Wiki, in "External tutorial" section.

https://github.com/libgdx/libgdx/wiki/E ... -and-phone
davebaol
 
Posts: 182
Joined: Tue Apr 08, 2014 7:08 am

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby 3DRoberto » Tue Jun 10, 2014 12:50 pm

@davebaol Thank very much for your help :D
3DRoberto
 
Posts: 9
Joined: Tue Jun 03, 2014 5:51 pm
Location: Seville, Spain

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby imagnity » Thu Jun 12, 2014 5:49 pm

In my case it fails in an extra area-

Crashes and hangs
Error Found: The crashes and hangs test detected the following errors:
Application 230ea6ec-8230-44c0-9934-aef1f0ad97f8_1.0.0.4_neutral__vvr7ygvdkxqcj was detected by Windows Error Reporting and experienced a crash or hang.

I just installed the latest VS Express for Windows.

Will look into it later. Can't think anymore.
Check out my games - http://www.imagnity.com/games/
imagnity
 
Posts: 197
Joined: Mon Mar 25, 2013 6:27 pm

Re: Porting our projects to Windows 8.1 Desktop/Tablet and P

Postby 3DRoberto » Sun Jun 15, 2014 10:05 pm

@imagnity It is an error you get when you're trying to implement CurrentAppSimulator or CurrentApp?
The default html project work correctly?
3DRoberto
 
Posts: 9
Joined: Tue Jun 03, 2014 5:51 pm
Location: Seville, Spain

Next

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest