Split screen for a local multiplayer game?

Hi guys, I made this game to test the local multiplayer.
You can play it online and move the first PG using the ARROWS and the second PG using WASD (or you can use the indiepad).

But there's a problem. The camera is only on the first PG (logically)
If the second PG's not in the "Hero's Area" you can not see it.

I'm thinking that the solution to this problem is to add a "split-screen". I'm not so good with JS.
Can anybody help me?
i think you need to chek in node js command to start second screen
am not sure if is possible but good luck
PHP:
// Load native UI library
var gui = require('nw.gui'); //or global.window.nwDispatcher.requireNwGui() (see https://github.com/rogerwang/node-webkit/issues/707)

// Get the current window
var win = gui.Window.get();

// Listen to the minimize event
win.on('minimize', function() {
  console.log('Window is minimized');
});

// Minimize the window
win.minimize();

// Unlisten the minimize event
win.removeAllListeners('minimize');

// Create a new window and get it
var new_win = gui.Window.open('https://github.com');

// And listen to new window's focus event
new_win.on('focus', function() {
  console.log('New window is focused');
});
i think you need to chek in node js command to start second screen
am not sure if is possible but good luck
PHP:
// Load native UI library
var gui = require('nw.gui'); //or global.window.nwDispatcher.requireNwGui() (see https://github.com/rogerwang/node-webkit/issues/707)

// Get the current window
var win = gui.Window.get();

// Listen to the minimize event
win.on('minimize', function() {
  console.log('Window is minimized');
});

// Minimize the window
win.minimize();

// Unlisten the minimize event
win.removeAllListeners('minimize');

// Create a new window and get it
var new_win = gui.Window.open('https://github.com');

// And listen to new window's focus event
new_win.on('focus', function() {
  console.log('New window is focused');
});

I have to put this in a js file and put it in the plugin foulder?
I have to put this in a js file and put it in the plugin foulder?
To try to understand you can try to copy it into a console debug (F8) and experiment.
more info here
https://nodejs.org/api/modules.html#modules_accessing_the_main_module
To try to understand you can try to copy it into a console debug (F8) and experiment.
more info here
https://nodejs.org/api/modules.html#modules_accessing_the_main_module
Ah, I saw. But I don't need a second screen. I think that the best way to play this game with two players (in co-op) is to split the screen.
Did you play it?
Yes the idea is cool, a return to the source, as with marioCar multi on N64 lol
Yes the idea is cool, a return to the source, as with marioCar multi on N64 lol
Yes 🙂 to play it with friends not only online, but also in the same room! (and if you have a small keyboard, you can turn your smartphones in gamepads to play it.)

But I need a script for the split screen T_T
So I can develop also other games like this! T_T

If anybody helps me... I will add: Author: Freank & Mr. X in the game page 🙂

Original thread: https://forums.rpgmakerweb.com/threads/split-screen-for-a-local-multiplayer-game.81411/