How to deploy RPG Maker MV app to Universal Windows Platform (UWP)

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
You can publish your RPG Maker MV games (tested with version 1.5.1) to the Universal Windows Platform (UWP). This is not supported by ENTERBRAIN, INC., however I have submitted a support ticket requesting they review this change for future UWP support.

Why would you want to?
  • Anyone with a Windows 10 device can play your game. (270 Million people as of 2017)
  • The Windows store is the least saturated of all the app stores with 500,000 apps. People will actually be able to find your app as opposed to Android/Apple where there are already multiple millions of apps.
  • You're already likely using Cordova to build the app, which is fully supporting the UWP platform. Just a 5 minute code change is all it takes to get RPG Maker MV working in this new store environment.

  1. Export to web browser from RPG Maker


  2. Open the export folder, copy it into a new folder and edit all the .js files, the gamefont file and index.html to be UTF8 (not UTF8 BOM unless you use WinJS)


  3. Create a new Visual Studio project, we'll use cordova because it's just easier. You can do it with WinJS but there are a ton of extra steps. Plus, you were already using cordova for your android/iOS versions right?


  4. Your cordova project folder has a directory called "www" which is where you want to place all the subfolders from your UTF8 RPG Maker export.


  5. We now need to make some edits to code:
    1. In rpg_core.js we need to edit line 306 and either comment out "null," without quotes, or replace "null" with “function(){}” without quotes. This is not necessary to make the app work, it's just good practice to iron all the bugs out. Comment this line with what you did, you aren't the only person who will ever see your code.



    2. In rpg_manager.js we need to edit one of the last lines (2839 as of this writing) in the plugin manager section with reference to async=false. In my app I changed this value to true, but I believe it would have worked to just delete the entire line.



      For extra reading why this matters you can review this article: https://www.html5rocks.com/en/tutorials/speed/script-loading/
      Short description? The edge browser is the runtime engine for UWP apps and it is not loading scripts correctly. Removing async or forcing it to true is an acceptable workaround to this bug/issue on UWP platform. I would not use this fix elsewhere although it may still work.

  6. Now you only need to add the windows icon and screen graphics you will be using for your app in the project/res folder under Icons>Windows and Screens>Windows respectively.

  7. Don't forget also to setup your appmanifest the way you like it. Ok now on to packaging.

  8. I did not have much luck making an app bundle for some reason (unimportant for this tut) so let's leave the default settings when opening menu Package > Store > Create App Packages.
    1. Pick your destination.
    2. Choose a version number but caution, Windows App Certification Kit (WACK) will fail if you select a build number other than 0. For example, 1.5.3.0 is ok but 1.5.3.5 is not ok.
    3. Do not check the "always increment" box, this incrementally changes the build number every time you reload this screen.
    4. Select the three platforms x86, x64 and ARM unelss you aren't publishing to ARM devices (and why wouldn't you?)


  9. Hey look at that, you clicked create and made a sweet UWP app that is actually going to work. Now run that WACK tool when the dialog opens and if you get any errors, resolve them, then start back at step 8.
  10. Now take the .appxupload files and upload them to your Microsoft Developer account. Done.

  11. Post your comments in this thread and if I can help I will be glad to do so.

*Note: this did work for WinJS, I will post more later on how to branch off and do WinJS.
 
Last edited:

rondchild

Veteran
Veteran
Joined
Jul 31, 2012
Messages
362
Reaction score
269
First Language
Indonesia
Primarily Uses
wow nice tutorial <3
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
484
Reaction score
288
First Language
Portuguese(BR)
Primarily Uses
RMMV
It's a nice tutorial, but you could introduce it with a bit of information of what is UWP and how it helps the developer(just a small introduction)
 

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
It's a nice tutorial, but you could introduce it with a bit of information of what is UWP and how it helps the developer(just a small introduction)
Excellent feedback, thank you @elpeleq42

OP has been updated with some reasoning. I also sent this thread to support because they may want to investigate whether they can fix the game code and include UWP in their list of supported platforms.
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
484
Reaction score
288
First Language
Portuguese(BR)
Primarily Uses
RMMV
Excellent feedback, thank you @elpeleq42

OP has been updated with some reasoning. I also sent this thread to support because they may want to investigate whether they can fix the game code and include UWP in their list of supported platforms.
Oh nice! The more plataforms, the better!

Thanks!
 

MoonMoonGames

Villager
Member
Joined
Apr 16, 2017
Messages
27
Reaction score
11
First Language
English
Primarily Uses
RMMV
Any guess when the WebGL portion will come out? I'm really interested in this.
 

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
Any guess when the WebGL portion will come out? I'm really interested in this.
Glad to see interest from the community! I can work on the WinJS part over Christmas when I get some time off work. I'll post an update to let everyone know once it is live.
 

Kareshi6

Warper
Member
Joined
Feb 4, 2018
Messages
1
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
Do I need any pre requisites to being able to do this?
My rpg_core.js doesn't contain those elements in line 306. I didn't find those terms (under "window.addEventListener"). Rpg_manager.js differs from this tutorial in content too.



If there's something I'm missing, please tell me. I'm highly interested in bringing it to UWP.
 

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
Do I need any pre requisites to being able to do this?
My rpg_core.js doesn't contain those elements in line 306. I didn't find those terms (under "window.addEventListener"). Rpg_manager.js differs from this tutorial in content too.



If there's something I'm missing, please tell me. I'm highly interested in bringing it to UWP.
You can actually skip that part and it will still work That step was just so you wouldn't have any error messages in the debug output window within Visual Studio.

Now if you still want to fix that anyway, I would need a little more info. What version RPG Maker are you using? Was the output from RPG Maker set to web deployment?

Let's dig in and I'll be glad to try addressing this.

FYI, Microsoft contacted me about two months ago saying they had fixed this on their end and that I should try to rebuild my package. I haven't confirmed that yet but it would be interesting if they developed a permanent fix.
 

Moza

Warper
Member
Joined
Apr 30, 2018
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi all. Great tutorial - THANKS! I have one problem... none of the audio is working. I get the error:

WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported.

Could this be because UWP doesn't support .m4p or .ogg (the formats of my media files)... or have I not encoded one of the js files properly etc?
 

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
Hi all. Great tutorial - THANKS! I have one problem... none of the audio is working. I get the error:

WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported.

Could this be because UWP doesn't support .m4p or .ogg (the formats of my media files)... or have I not encoded one of the js files properly etc?
Can you let us know what troubleshooting has been tried so far? It sounds like you might need your own thread if this is just a general project error. Does the audio work when you publish to android or iOS?

It's great to see continued adoption of the windows store platform! Rest assured we can get our apps working on UWP without too much extra work.
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
Hi all. Great tutorial - THANKS! I have one problem... none of the audio is working. I get the error:

WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported.

Could this be because UWP doesn't support .m4p or .ogg (the formats of my media files)... or have I not encoded one of the js files properly etc?
Same issue for me right now. Game works perfectly, except for the sound. Tried building for Android, same error and no sound. Tried a few NuGet libraries for decoding .OGG, no joy either.
 
Last edited:

cunningorb

Veteran
Veteran
Joined
Jun 27, 2017
Messages
34
Reaction score
14
First Language
English
Primarily Uses
RMMV
Same issue for me right now. Game works perfectly, except for the sound. Tried building for Android, same error and no sound. Tried a few NuGet libraries for decoding .OGG, no joy either.
Sorry to hear that. I will have to test this on my project to see if I can replicate the issue. What version of RPG Maker is your project using? Was it working before and then you got an update to 1.6.1? Does the sound work in the RPG Maker editor with no error messages?

Does Visual Studio note any errors when you test it in debug mode? These errors would be the best starting point for debugging the issue.

Where are you seeing "WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported."
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
Sorry to hear that. I will have to test this on my project to see if I can replicate the issue. What version of RPG Maker is your project using? Was it working before and then you got an update to 1.6.1? Does the sound work in the RPG Maker editor with no error messages?

Does Visual Studio note any errors when you test it in debug mode? These errors would be the best starting point for debugging the issue.

Where are you seeing "WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported."
Sound works perfectly in RPG Maker MV (editor). The error noted is the only one (for every audio file that plays) in the normal Output area. MV Version is 1.5.2. This is in Debug Mode, Local Machine, Windows x86. Tried some .m4a files, same result.

I got another opinion, and he thinks that the way MV decrypts sound files (.OGG mainly) doesn't play nice for mobile or UWP purposes.

I guess the Edge browser is used for the play container on VS by default, and for some reason Edge's newer versions aren't allowing access to the Web Media Extensions needed to play .OGG?

Also: How do you do this same thing with WinJS? You mentioned you were going to post about doing it with that. Edit: Seems WinJS has a similar issue.
 
Last edited:

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,721
Reaction score
1,200
First Language
Greek
Primarily Uses
RMVXA
OK. I have experimented a bit with newer versions of Windows 10 and I have a suspicion about how Web Audio API (and possibly a similar API) went bust. I haven't submitted a ticket or posted in any forums yet until I have a good idea of what's going on. I tested Microsoft Edge's Web Audio API, and most of the samples ran fine. Some were iffy (possibly being optimized for Chrome). Then I deployed both a Cordova and a WInJS app to my phone (a Lumia 535 running Windows 10 Mobile, version 1703). The audio played fine. Weirdly, I know that Edge (since it powers HTML5 games on UWP) played the audio fine until build 16299. So I suspect the following:

1. The built-in version of Cordova on Visual Studio hasn't been updated to support the newer renderer.
2. The Web Audio API has changed.
3. The code that is responsible for handling the sound has a bug.
4. Microsoft Edge has a bug.
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
My educated guess is something self-contained in terms of playing/decoding sound will need to be made from the RPG Maker code somewhere, either that or a kludge that allows other audio formats to be used and/or something that doesn't rely on Chrome/Edge/whatever to work. Not someone versed enough in Javascript or sound decoding to do that really myself. :)
 
Last edited:

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
Sorry to hear that. I will have to test this on my project to see if I can replicate the issue. What version of RPG Maker is your project using? Was it working before and then you got an update to 1.6.1? Does the sound work in the RPG Maker editor with no error messages?
Does Visual Studio note any errors when you test it in debug mode? These errors would be the best starting point for debugging the issue.
Where are you seeing "WEBAUDIO17014: Decoding error: The stream provided is corrupt or unsupported."
Have you been able to replicate the issue? I can confirm there definitely is an issue with this right now. At this point, I think the sound system might have to be redone a bit for this to work, as MS (I posted on their forums) basically believes its RPG Maker's issue to solve and closes out my ticket.
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
The sound issue (to the XBox One anyway) seems to be solved by using .M4A files for the music and sound. .OGGs and .MP3s don't work at all.

Now all I have to do for the XBox One is have some way to sign into the XBox Live part of it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top