jsj's Recent Forum Activity

  • Just make the host broadcast a message to the peers with the text to show, or just the score, and then in the peers paint the message.

  • This question is something I'm working on.

    The Multiplayer plugin, as-is, doesn't work on iOS because that system doesn't support WebRTC.

    Meanwhile I'm trying to "modify" the Multiplayer plugin to make it work on iOS through a Cordova plug-in (https://github.com/eface2face/cordova-plugin-iosrtc)

    I've had no time to test this. But I think could work.

    If you need Multiplayer on iOS working ASAP then go for Photon.

  • Adding a "Touch -> Not Is touching B2" to the "On touched B1" would do the trick... but perhaps is not exactly what you want.

  • I've checked disconnecting and reconnecting signalling server via Multiplayer plugin but, as you said, this doesn't solves nothing.

    Will try to check what's going on and if there's a workaround. If so I will post here.

  • Ok. I was reloading game so it works fine.

    If I simply let the game redirect me to the "login" again, the second time things are messed as you say. Seems that the actions from Multiplayer: "leave room" or "disconnect from room" are leaving something in an "unknown" state in the server or in the client.

    Perhaps adding a "disconnect form signalling server" and then again reconnect could resolve the problem?

  • Running the CAPX in Chrome. Played first game with "AAA" as host and "BBB" as peer of "AAA". All OK.

    Second game, after disconnection, played with "BBB" as host and "AAA" as peer of "BBB". All OK.

    Can't reproduce the problem you're talking about. I'm missing something?

    I've understand that the buttons for "host" and "peer" are mainly to allow to any player pair with any other. Some players connect as "host" and other players select the "host" they want and connect with him pressing "peer". Is like a manual pairing of players.

  • To 1 and 2 I can't answer because don't know exactly what's hapening. Seeing the screenshot you posted I assume you are "cloning" the Ghost Shooter multiplayer example that comes with Construct.

    If so, the only thing I could advice to you is to check the Sync statements on the Signalling section and look if all variables controlling ship movement are synched. And if so, perhaps change his mode of "Interpolation" to see if that resolves the placement problems you are experiencing.

    In the multiplayer games I'm developing I'm using a mechanism to synchronize some Arrays with data about each player between all peers and host (cards each one has in hand, cards played, ...). But position of sprites is left to the Multiplayer plugin and his synchronization mechanism.

    About point 3, in the games I'm developing I put a screen in the "host" that shows "peers" as they are being connected. And a button to "Start game!" when the host sees all the "peers" are already connected. The host is not a player, is something like a "game-master", controlling the other players, maintaing synchronized all the underlying data, ... He has controlls to modify the state of the game and also to "kill" the game if he decides to do so.

    Also, on top of this, there is a mechanism implemented to control the reconnection of a "peer" in case it disconnects in the middle of a game, saving his state in case of disconnection and restoring it whenever the peer connects again. Only connections of peers previously connected are allowed. We check it using the "nickname" introduced on first connection. Not the most efficient mechanism but it works for our needs.

    Don't know if I have given you the directions you need to implement point 3. It's tricky because the Multiplayer model of Construct, but doable.

  • I'll give it a try. But this will be when I return from my Holidays!!!.

  • jayderyu I've been looking to that Cordova plugin (iosrtc). And I've an idea but don't know if it's doable. My technicall knwoledge about Cordova and iOS is not very advanced.

    My idea is to "duplicate" the "Multiplayer" plugin of C2 and call it, for example, "Multiplayer2". Then modify "Multiplayer2" to detect if is executing under iOS (think this is trivial) and if in iOS "shim" (or whatever you call it) the RTCPeerConnection functionallity that, if I'm not wrong, is the only function that Multiplayer uses.

    From c2mp-peer.js of C2 Multiplayer:

    var RTCPeerConnection = window["RTCPeerConnection"] || window["webkitRTCPeerConnection"] || window["mozRTCPeerConnection"] || window["msRTCPeerConnection"];[/code:gfbk8165]
    
    I'm planning to add something like this:
    
    [code:gfbk8165]// Just for Cordova apps.
    document.addEventListener('deviceready', function () {
      // Just for iOS devices.
      if (window.device.platform === 'iOS') {
        cordova.plugins.iosrtc.registerGlobals();
      }
    });[/code:gfbk8165]
    
    As they say in his documentation:
    
    [quote:gfbk8165] iosrtc.registerGlobals()  also [b]generates  window.webkitRTCPeerConnection  and  navigator.webkitGetUserMedia()  for backwards compatibility with WebRTC JavaScript wrappers/adapters[/b] that assume browser vendor prefixes ( webkit ,  moz ) in the underlying WebRTC API.
    
    
    In theory if I generate for Cordova in C2 and add the Cordova plugin:
    
    [code:gfbk8165]$ cordova plugin add cordova-plugin-iosrtc[/code:gfbk8165]
    
    Then this should work on iOS.
    
    As I said although I'm veteran programmer I'm not familizarized enough with Cordova internals and C2 plugins. And never have done anything for iOS nativelly, only small hybrid apps with Cordova.
    
    But, do you think this could work?
  • I'm just with the same problem on iOS. Multiplayer games I'm working on runs smoothly on Android but on iOS is another history.

    I'm only been able to make it working on iOS using Bowser, exporting the games to HTML5. Bowser is the only browser on iOS that, to date, supports WebRTC. But Bowser has his pitfalls, is not as competent as Safary or Chrome in terms of funcionallity. But to make Construct 2 multiplayer-games work on iOS is near perfect.

    I'm trying to use CocoonJS also. But all my tests have failed and I think that CocoonJS doesn't support WebRTC at all, or his support is not as complete as to make multiplayer-games made with Construct 2 works.

    A question: could it be possible to modify the Construct 2 Multiplayer plugin to use that Cordova/PhoneGap plugin for WebRTC jayderyu just mentioned?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks ASHLEY. Working here too.

    The only "problem" in this situation is the lack of information of what the problem is, and the estimated downtime.

  • Same problem here. Suddenly the multiplayer game we are developing has been giving connection errors to the signalling server.

    Anyone knows if this is going to being solved soon?

jsj's avatar

jsj

Member since 28 May, 2014

None one is following jsj yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies