Loading into a Universal Windows App (PLATFORM SUPPORT CANCELED, NO LONGER ACCEPTING REPLIES)

Status
Not open for further replies.

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
739
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
Anyone ever have any luck getting MV content to load into a universal Windows app? I know that it primarily involves the WebView and I've tried several ways to do it (including obvious ones like NavigateToString, myWebView.source, and of course the complicated-but-serviceable NavigateToLocalStreamUri and I'm having issues no matter what.

I can confirm that it at least manages to load the index.html so I'll check to see what else may be happening, but any insight would be appreciated in the meantime.

EDIT: For unforeseen reasons and technical difficulties this provision for my project has been canceled. Thank you all for your time and support in this matter. (Please note that this only affects the Xbox release - my distribution plans for Android, Steam, GameJolt and itch are still on track.)
 
Last edited:

Windows i7

Veteran
Veteran
Joined
Nov 4, 2017
Messages
366
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
There's probably a debugger that you can use to figure out what is happening internally. That may be the easiest way to find the issue. If I had to guess, I'd say it is failing to find the other files due to relative links or something similar.
 

BalticoX

Villager
Member
Joined
Jul 22, 2019
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
I was able to run my game as a Universal Windows App using Cordova Tools for Visual Studio 2017.

You can use the Cordova Tools for Visual Studio Code extension (which provides support for the latest version of Cordova) but I only tested with Visual Studio 2017.

The only problem I faced was that I was unable to me make the game full screen, it has something to do with Edge being the webview and restricting windows resizing. I still think it’s something that can be solved but I could not, so I ended up publishing on Steam.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
739
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
Regarding the window resize, I kind of realized that I could play with it and force it into fullscreen regarless of status. The WebView can technically be handled by resizing it to the full grid size and then setting width and height to auto. That said, in referencing the Cordova tools I unfortunately don't see it as being carried over to VS2019 (may have been deprecated, though I'm not 100% on that so don't quote me) however there is also a VS2017 option for a JavaScript-based universal app which I am trying out for the sake of comparison.
 
Last edited:

BalticoX

Villager
Member
Joined
Jul 22, 2019
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
Yes, Visual Studio 2017 is required at the moment since there is no Cordova Tools for 2019 at this time. I would be interested in forcing full screen on a Windows Universal App, if someone can share the HTML CSS or JavaScript that do this I would appreciate it.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
739
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
I think I have an idea of what to do in that case. I'm guessing there's a reason that it didn't carry over from 2017 (requirements or support change, or perhaps a license issue or similar) but what I can say is that to force fullscreen there's a workaround that involves the resize function. That of course is beyond the scope of why I posted this so I'm hesitant to explain further because then it could be misread as an interruption (or hijacking as we call it around here) and I obviously don't want to do that.

EDIT: I think the Cordova tools also has a fullscreen toggle when going through the config.xml designer. Thing is, I'm still working on getting the information to load properly so I can't say anything about that until I finish this. I also have a plugin that forces fullscreen and don't know if that has any bearing.

EDIT 2: Now I have another problem: broken packages. I literally build to absolute **** that doesn't work at all, much less finish the launch cycle. And the only clue I have is a cryptic "no packageOutputPath is specified for the project" situation with literally "nothing to copy". I'm gonna need some insight on this as I completely refuse to give up.

EDIT 3: Screw Cordova. After a multitude of edits I have now officially got it working off a straight JavaScript project, but with one minor issue: the game doesn't fill the display, and I had to mod the Yanfly Core in order to actually start the game. Any advice on a Universal Windows alternative to the plugin's screen fill measures without having to remove several other plugins that are necessary for my game to function? Here's the code* in question:

JavaScript:
system.Resolution = function() {
  var Width =  render.Param.Width - window.innerWidth;
  var Height = render.Param.Height - window.innerHeight;
  if (!Imported.ScreenResolution) {
    window.moveBy(-1 * Width / 2, -1 * Height / 2);
    window.resizeBy(Width, Height);
  }
};
=======================================
* This is actually a generic edit of the code, and not as it was originally written. Because of Yanfly's license change I cannot be any closer to the actual product.
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
739
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
I think I just narrowed down the size issue, and it has nothing to do with the code above. Instead, the solution appears to be in the rpg_core.js script (and specifically these two values):

JavaScript:
    this._scale = 1;
    this._realScale = 1;
In case it helps, they're in the Graphics.initialize function. Setting them to an equal value resizes the game viewport accordingly (in 4K, it should be 3.34 and 1080p at 1.62, and that's before I resolve the fullscreen display matter).

All I need at this point is a means to detect the screen resolution and scale the game in accordance with that. EDIT: Apparently the standard window.screen.width property works for this like anything else, and the detection is now implemented. Once I get the fullscreen mode figured out and finalize the rest then I should be good to go.

EDIT 2: Fullscreen is now finished. After digging around in StackOverflow, MSDN Docs and all kinds of TechNet discussions I finally tumbled upon the following piece of code:

JavaScript:
var ViewManagement = Windows.UI.ViewManagement;
var ApplicationViewWindowingMode = ViewManagement.ApplicationViewWindowingMode;
var ApplicationView = ViewManagement.ApplicationView;
With this added to the MV portion of the project, I then changed the startup processing to run the fullscreen activation off the referenced UWP libraries:

JavaScript:
window.onload = function () {
    ApplicationView.preferredLaunchWindowingMode = ApplicationViewWindowingMode.fullScreen;
    SceneManager.run(Scene_Boot);
};
Now all that's left is to determine the scaling for each of the standard resolutions the game will support, changing the originally-quoted material from rpg_core.js in the Graphics.initialize function so that the game scales properly for each individual possibility (currently tested up to UHD spec as the Xbox Series X is obviously still a good several months away from the time of this post). And after several more tests and edits, this is ultimately what I came up with:

JavaScript:
    if (window.screen.width == 1920) {
        this._scale = 1.74;
        this._realScale = 1.74;
    } else if (window.screen.width == 2715) {
        this._scale = 2.44;
        this._realScale = 2.44;
   } else if (window.screen.width == 3840) {
        this._scale = 3.48;
        this._realScale = 3.48;
    } else {
        this._scale = 1;
        this._realScale = 1;
    }
As a side note, I'm not sure after all this that the material here even belongs in MV deployment anymore with regard for all of the work that went into getting this done, which brings things a bit too close to the implementation side for the original intention. But obviously that's another topic for which I'm short on time (and for the mods to determine as well). I will also be testing against the plugins that I was able to port over (and not all of them did, though at least the important ones are holding up in preliminary results) and will report back with a final analysis once that's complete.
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
739
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
Sadly after so much work I have encountered an unresolvable issue with the game. While everything checks out and functions properly, it is extremely slow and almost unplayable in its current state leaving me with no choice but to cancel the Xbox version of my project. As a consolation I will be publishing my initial device-targeted builds on Android to replace the Xbox release. (No concern about everything else, however - the remainder of my development roadmap is still on track.)

Thanks again for all the support on this subject.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,191
Reaction score
4,302
First Language
Dutch
Primarily Uses
RMXP

Closing at OP's request. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

I usually don't enjoy survival games, but I absolutely love Conan Exiles.
Basically Everyone: Dont make a long game the first time. Me: I guess i'll make a REALLY long game in that case >:p
I've developed a habit of thanking cleaning ladies for their work.
Sorry Aerith... I will abandon your shoes... :guffaw:
Spent a whole bunch of time today reworking the area in the video because someone said it was too illusory. So I reworked it so it changes less, moved the grass up to the same level as the player.... And found enough extra resources to make the grass moves when the player touches it. Also lots more water, because it looks amazing. I'll probably put up a short updated video later today.

Forum statistics

Threads
95,771
Messages
931,773
Members
126,171
Latest member
webbmichael
Top