This tutorial attempts to describe the process of how the Jemchicomac team has ported Crazy Belts (developed in LibGDX) to Windows 8.1 Desktop, Tablet and Phone.
- Preparations
- Compiling the LibGDX HTML Version from Eclipse
- Preparations in Visual Studio 2013
- Running on Windows Desktop and Tablet
- Windows App Certification Kit on Windows Desktop and Tablet
- Running on Windows Phone
- Windows App Certification Kit on Windows Phone
Preparations
If we open the file index.html we can see that JS files are included inside of a directory named *.GwtDefinition.
1. We make sure to delete all *. Cache.js files in that directory (if any).
Compiling the LibGDX HTML Version from Eclipse
2. Instead of using “SuperDevmode” through of Run_As .. Java Application & Run_As.. Web Application, we compile with GWT in final form.
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).
We will see the compile process and once completed the files are ready in the war directory.
Preparations in Visual Studio 2013
4. Open a new project from Visual Studio 2013.
5. We are located in our work area and select Templates > Javascript > Store Apps > Universal Apps > Blank App (Universal Apps).
6. Copy the files previously generated by GWT in the step 3, in the war folder, except the warWEB-INF directory.
7. Paste over the Shared node of our project.
Being as follows:
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”.
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.
10. Paste the lines in the index.html file, before of SoundManager scripts.
In this moment we can perform a test.
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”.
12. Again select the “Windows 8.1” project and open PROJECT > Store > Create App Packages..
13. Select “NO” on the question and hit on “Next”.
14. We number our version and choose the type “Release (Any CPU)”. Hit on “Create”.
15. Once created the files in yourProjectyourProject.WindowsAppPackages, hit on “Launch Windows App Certification Kit” in “Local machine” mode.
16. Select all test and hit on “Next”.
We let that perform the validation of the App.
Validating no are finish well.
We see that the cause of errors is the encoding of the files.
17. We solve by opening the reported files.
18. One by one we are doing “Save As.” and save to “UTF-8 with signature”.
Now should pass successfully the validation of the “Windows App Certification Kit”, so we repeat from step 12.
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.
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”).
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).
At this moment the error that we get from IE 11 with a Windows Phone 8.1 phone is this:
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..
22. Select “NO” on the question and hit on “Next”.
23. We number our version and choose the type “Release (Any CPU)”. Hit on “Create”.
24. Once created the files in yourProjectyourProject.WindowsPhoneAppPackages, hit on “Launch Windows App Certification Kit”.
25. Select all test and hit on “Next”.
We let that perform the validation of the App.
If we had done step 17 of encode the files to “UTF-8 with signature” everything should go smoothly.
After executing successfully the above steps, we have our game running over our “Windows”
Solidux
Thank for sharing xD
Magnesus
So it works on a tablet Windows, even Windows RT, but doesn’t on Windows Phone because of that shader loading bug?
jemchicomac
Hi Magnesus,
yes, the problem is because the implementation of IE11 in Mobile Phones and RT is different to the one in Desktop. We’ve tried to find a workaround and we couldn’t. Hence, we are waiting for Microsoft or libGDX (if it can be solved there) to publish the game in Windows Mobile Store.
Regards
lee
Nice tutorial!
Do you know if this would work for a 3D game?
jemchicomac
Hi Lee,
we do not see any limitation impossed by this procedure about what libGDX can do natively
In our experience, libGDX has an excellent, but limited in features and tools, for 3D but everything should work ok in the same way thinks works in webGL via gwt.
Regards
Mehedee hassan
there is a post on libgdx forum .. is it you ?? http://www.badlogicgames.com/forum/viewtopic.php?f=17&t=14766 … it says that the procedure will work on windows phone . please ..it will be very helpful if you explain 🙂
jemchicomac
Hi Mehedee, this is a tricky issue.
Described procedure works for IE11 Desktop and tablet based on Intel architecture (the “Surfaces PRO”) but not for Mobile and Surface (without “PRO”) based on ARM chipsets.
Problem is not related to the chipset per se, but the actual IE11 implementation, that differs across versions. You can see a detail of the lack of compatibility of libGDX with the non-PRO IE11 here: https://github.com/libgdx/libgdx/issues/1138 libGDX team decided to close it without solving
However, some folks made a kind of workaround (outside official libGDX) making things work on Windows Phone, checkout in the libGDX forums