Split screen for a local multiplayer game?

Discussion in 'JS Plugin Requests' started by Freank, Jul 17, 2017.

  1. Freank

    Freank Veteran Veteran

    Messages:
    369
    Likes Received:
    146
    Primarily Uses:
    N/A
    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?
     
    #1
  2. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,353
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    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');
    });
     
    #2
  3. Freank

    Freank Veteran Veteran

    Messages:
    369
    Likes Received:
    146
    Primarily Uses:
    N/A
    I have to put this in a js file and put it in the plugin foulder?
     
    #3
  4. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,353
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    #4
  5. Freank

    Freank Veteran Veteran

    Messages:
    369
    Likes Received:
    146
    Primarily Uses:
    N/A
    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?
     
    #5
  6. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,353
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    Yes the idea is cool, a return to the source, as with marioCar multi on N64 lol
     
    #6
  7. Freank

    Freank Veteran Veteran

    Messages:
    369
    Likes Received:
    146
    Primarily Uses:
    N/A
    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 :)
     
    #7

Share This Page