Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,399
Reaction score
849
First Language
Poland
Primarily Uses
RMMV
Does node.js natively have a script call to remove window border? If yes, then what is it?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,045
Reaction score
2,358
First Language
EN
Primarily Uses
RMMZ
I'm not sure if there's a way to change it at runtime, but you can add the following option to your project's manifest file, package.json, in the window category:
  • "frame": false
E.g.
JSON:
{
    "name": "",
    "main": "index.html",
    "js-flags": "--expose-gc",
    "window": {
        "title": "",
        "toolbar": false,
        "width": 816,
        "height": 624,
        "icon": "icon/icon.png",
        "frame": false
    }
}
More details here~

(For MZ users: the editor overwrites package.json when you save your project. You can edit the manifest after deploying your game.)
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,399
Reaction score
849
First Language
Poland
Primarily Uses
RMMV

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,045
Reaction score
2,358
First Language
EN
Primarily Uses
RMMZ
So the problem is actually related to fullscreen mode? The default fullscreen is DOM-based: it asks the page to go fullscreen, but maybe something in the newer version (or your plugins?) blocks that. NWJS (playtest & standalone deployment) has methods to fullscreen the actual browser window:
Maybe try something like this in a plugin:
JavaScript:
/*:
 * @target MV
 * @plugindesc Use NWJS for fullscreen when appropriate.
 * @author Caethyril
 * @help Terms of use: free to use and/or modify for any project.
 */

(alias => {
    Graphics._isFullScreen = function() {
        if (Utils.isNwjs())
            return nw.Window.get().isFullscreen;
        return alias.apply(this, arguments);
    };
})(Graphics._isFullScreen);

(alias => {
    Graphics._switchFullScreen = function() {
        if (Utils.isNwjs())
            nw.Window.get().toggleFullscreen();
        else
            alias.apply(this, arguments);
    };
})(Graphics._switchFullScreen);

(alias => {
    Graphics._requestFullScreen = function() {
        if (Utils.isNwjs())
            nw.Window.get().enterFullscreen();
        else
            alias.apply(this, arguments);
    };
})(Graphics._requestFullScreen);

(alias => {
    Graphics._cancelFullScreen = function() {
        if (Utils.isNwjs())
            nw.Window.get().leaveFullscreen();
        else
            alias.apply(this, arguments);
    };
})(Graphics._cancelFullScreen);
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,045
Reaction score
2,358
First Language
EN
Primarily Uses
RMMZ
It seems OK for me, but so does the normal fullscreen: I haven't touched the version of NWJS that ships with RMMV. So, assuming you updated everything correctly, I guess it's a conflict between RMMV's setup and some change(s) made between NWJS versions 0.29.4 and 0.58.0.

Maybe someone more experienced with this stuff will have some advice... :kaoslp:
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,399
Reaction score
849
First Language
Poland
Primarily Uses
RMMV
Yeah... It seems to be a problem with nwjs itself... So I don't know what to do now.
there are maps in my game, where on my pc setup on nwjs 0.29.0 (MVs default) FPS drops to 30fps, and full screen works fine, but on the otherhand on nwjs 0.58.0 full screen don't work as it should, but game keeps static 60fps. @caethyril
 
Last edited:

Castspeller

Villager
Member
Joined
Sep 3, 2019
Messages
20
Reaction score
11
First Language
English
Primarily Uses
RMMZ
PLEASE READ FIRST - USE AT OWN RISK:

Always back up your files, especial system files like *.json.

NOTE: These changes could cause a blank screen and is probably why there is not a built-in Full Screen function in RPG Maker. If you get a blank screen then the only way to end the game is to do a Ctrl-Alt-Delete and select Task Manager. Find nwjs, then right click and End. Do this for all nwjs's (Sorry I do not know how to kill applications for OSX or Linux).

The method described by @caethyril does work in both MV and MZ.

I have added a line for Full Screen - it WILL force the game into full screen, but there is a drawback - you will need to put an "End Game". Other users have plugins for this, like:

Luna Quit to Desktop

This is needed since the window FRAME is gone and there is no X to hit.

Sample changes for package.json:

JSON:
//package.json for MZ
{
    "name": "rmmz-game",
    "main": "index.html",
    "js-flags": "--expose-gc",
    "chromium-args": "--force-color-profile=srgb",
    "window": {
        "title": "Awesome Game",
        "toolbar": false,
        "fullscreen": true,
        "width": 816,
        "height": 624,
        "position": "center",
        "icon": "icon/icon.png",
        "frame": false
    }
}

The additions needed for MZ are:
  1. "js-flags": "--expose-gc",
  2. "toolbar": false,
  3. "fullscreen": true,
  4. a comma needs to be added to the line "frame": false
  5. and finally "frame": false
JSON:
//package.json for MV
{
    "name": "",
    "main": "index.html",
    "js-flags": "--expose-gc",
    "window": {
        "title": "",
        "toolbar": false,
        "fullscreen": true,
        "width": 816,
        "height": 624,
        "icon": "icon/icon.png",
        "frame": false
    }
    }
}

The additions needed for MV are:
  1. "fullscreen": true,
  2. "icon": "icon/icon.png", NOTE: this line only needs a comma added
  3. "frame": false

REMEMBER
- Backup your files and know how to kill an application on your system.

Good luck :)
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,399
Reaction score
849
First Language
Poland
Primarily Uses
RMMV
@Castspeller that's one of the best explanations I've seen on this forum, however this won't work, believe me, I've already checked, that's one point, second point, this will work in older versions of nwjs, but setting fullscreen: true in package.json file will force to open application in full screen, but the player will not have the option to switch to window mode again, since there are two know to me script calls giving ability to switch between full screen and window:

Graphics._requestFullScreen() - swtich to full screen mode
Graphics._cancelFullScreen() - switch to window mode

and built in natively in nwjs:
nw.Window.get().enterFullScreen() - swtich to full screen mode
nw.Window.get().leaveFullScreen() - back to window mode

As I said, in older versions of nwjs (probably to version 0.40.0) entering full screen is OK, above versions causes the "bug" shown in this image. Right now I've stick to nwjs version to 0.40.0 and PIXI 4.9.8 and I say game runs more-less OK, but I'd like to use the latest updates without problems.

So you're pretty damn close, but we all miss something. Right now I put aside that matter and wait for another nwjs update and see how it will end up. Not that really matters, because I have 60 fps and full screen on nw 0.40.0, but having 0.59.1 nwjs would be... at least better.
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
97
Reaction score
70
First Language
English
Primarily Uses
RMMZ
@Castspeller
Graphics._requestFullScreen() - swtich to full screen mode
Graphics._cancelFullScreen() - switch to window mode

and built in natively in nwjs:
nw.Window.get().enterFullScreen() - swtich to full screen mode
nw.Window.get().leaveFullScreen() - back to window mode

As I said, in older versions of nwjs (probably to version 0.40.0) entering full screen is OK, above versions causes the "bug" shown in this image.
These script calls all work just fine in MZ, so you probably can upgrade NW.js to 0.48.4 at least. I would imagine that there is a reason why GGG hasn't upgraded MZ's NW.js higher than that, so I personally wouldn't upgrade MV higher than that either.
 

Latest Profile Posts

Been playing through Skies of Arcadia again, and it really makes me wanna see someone try to implement how ship battles were done in the game into RPG Maker (or really just in general).
split.png
split view of both versions of the pocket city you traverse through. there's differences like areas only being accessible in one version of Autumn Bay. or events that only happen in one or the other.
theortically if there were a developer who spied on people's game playthroughs and changed things in real time to make it harder for them, what might be said game developer's motivation?
Hi everyone! Enjoying this nice long weekend. How are you all doing? :)
I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.

Forum statistics

Threads
118,433
Messages
1,115,917
Members
155,391
Latest member
dndrself
Top