Multiplayer Help! lots of Question

  • Question 1.

    How do I remove a peer character after disconnecting?

    Info:In my game currently the player stays on the host screen after disconnecting but vanishes on peer screens. The disconnected peer causes Invisible walls to occur for other peers.

    Question 2.Is it possible for a peer to have a save file for their character saved locally ?

    Info:I need player character data to be saved locally,how do I save certain variables and then reload them upon creation of that peer.

    Question 3. how do I host a server instead of players hosting?

    Info: I can not find a tutorial on this. I have seen the server for sale in scirra store but not sure if it is what I need to Host a server for an Android MMO from my windows computer. I have bee nable to host a game from an emulation on my computer and have peers from phones join that but I fear this would not work with a large number of players.

    Question 4.How to add PvP?

    Info:my peers all carry the same object so how do I tell it to collide with other peers object but not its own?

    Thank you for taking the time to read this.

  • 1)

    Common

    On peer disconnect, Multiplayer.PeerID should reference the object(s)** to be destroyed.

    2)

    When a game starts and you have your own variables stored locally or from some ajax, you can simply set those values and relay them through the host with the other players. When a new player joins, it should request those values from the host.

    3)

    The current multiplayer mechanics are geared toward web based hosts and peers.

    The signalling server in the store is for a dedicated hosting of server that allows the connections between web hosts and peers, not a game host itself.

    For MMOs you could look into Ajax and PHP to centralize a player database.

    4)**

    As with point 1, you simply need to add references. Though you synch the peer object, with PeerID, you can pass that peer id to anything you create while creating the players assets.

    Player.peerid = 01A0

    Hitbox.peerid = 01A0

    Sword.peerid = 01A0

    Helmet.peerid = 01A0

    On peer disconnect

    Pick objects with peerid = 01A0 (Multiplayer.PeerID) and destroy.

    Voor PvP make them enter a room with max 2 players

  • question one resolved.Thank you that works simple enough.

    Question 2-3:I will start looking into ajax,didn't know where to start this is big help again Thank you.

    Question 4"

    This is not working,maybe because I am setting peer ID on main hand improperly. where Under peer group mainhand on created set variable peerID to Multiplayer.Myid

  • Add pick all MainHand above the pick by evaluate.

    But, the mainhand is already involved in the collision,

    Shouldnt it then be:

    Mainhand on collision with hitbox

    Pick all peer

    pick peer where peer.peerid = mainhand.peerid

    or

    Mainhand on collision with hitbox

    Pick all peer

    pick peer where peer.peerid = hitbox.peerid

    depending on who is doing what

  • We need some help with the local storage.

    Were attempting to save instance variables for each peer locally. I would rather save an array for each player individually if that's an option. Neither of which work for us.

    The webstorage is saving but it seems either it only updates on the host side or it triggers for ALL peers on one screen. I must be missing a command does anyone have an example or tutorial for updating the local storage for only one peer at a time and have the host relay that?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ugh this is killing me this one simple thing.

    Okay so the collision should trigger the webstorage per peer which should save that data to the player locally and when they login they should be able to load that data for themselves and check for the guns other people have. what am i doing wrong?

    This is what i want to achieve:

    So when each player touches the gun they pick it up until they die and keep it on log out.

  • best way thx you so much

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)