How do I fix multiplayer issue?

0 favourites
  • 12 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • I have an issue with multiplayer functionality using c3. Everything works good until I try to use host and peer movement independent of each other.

    problem 1: The host will move both host and peer

    problem 2: The peer will update rotation for both peer and host, but does move on its own.

    I have extensively went through the multiplayer 1-4 readings, went through using multiple sources of content for figuring out how to configure it, and even went as far as collecting "working" data from the test game source files just to see if I missed anything or did anything wrong.

    I have yet to find, in the past 12-13 hours, anything I did wrong with the codes.

    Maybe a second set of eyes can notice something I am somehow blind against? lol

    I am not sure if it is something with local connection or something simple. BUT, I have went over the codes many many times, testing changes, looking at the debugger over and over, and changing stuff again, etc etc. I have to say, at least I have learned a LOT about multiplayer now! :P

    Just cannot get host and peer to do things completely on their own. Its gotta be some setbit or getbit update I assume, BUT I dont see anything wrong. :/

    Here is a video of what I am trying to fix. So ask me anything you need to know to help if you can, except asking for my capx. I dont feel comfortable giving that out for good reason.

    youtu.be/lF2H8HlGiI8

  • Stuff like this requires the events to solve.

    You can email me the c3p/capx file and I will try to fix it for you.

    Removed

  • As I was compiling the formatted example into an export, I noticed where the issue was! Thank you for requesting that information, otherwise I may not have seen it. Strangely enough, it was immediate.

    note: Highly recommend when stuck on these issues, sleep! lol Then come back :P

    So, the issue was not with setbit or getbit communication, rather overlapping common controls.

    When I have changed the controls for the host (not peer connected), I did not release the input connection from the common areas of each player, therefore, both inputs were trying to run not just for host, but for any peer.

    So, that is why the host and peer had different errors, because it was a commmon event error, rather than mp communication error. I was looking for the error in the wrong groups.

    So, if you are doing a multiplayer control setup, make sure any common controls are indeed intended for common use and not peer dependent as they are supposed to be. Even if you do have setbit and getbit, those PLUS common controls will try to send/receive data back and forth.

    Hope that helps anyone.

  • Nicely done.

    And yeah, decent sleep tends to help hehe. Many times I got issues solved by taking a well needed break ^_^

  • SO, now that I got that working, Im trying to establish remote preview with someone else but only the host can connect lol.

    Gotta figure that one out now :P

    Its supposed to work, but maybe its a code I have that checks for errors and takes action instead of just ignoring errors. So, Ill disable those first and see.

    Gonna be up late! :)

  • If only the host can connect you need a TURN server,

    Refer to this guide antonraharja.com/2016/03/17/setting-up-stunturn-server-on-meetme-id

  • Nicely done.

    And yeah, decent sleep tends to help hehe. Many times I got issues solved by taking a well needed break ^_^

    Absolutely haha. Like a new pair of eyes alone :P. Thank you for the help though, even though I didn't get the cp3 to you :)

  • If only the host can connect you need a TURN server,

    Refer to this guide antonraharja.com/2016/03/17/setting-up-stunturn-server-on-meetme-id

    Ahhhh that's what I figured would be such. Dedicated I assume? If so, thats no problem :) Will read :) Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If only the host can connect you need a TURN server,

    Refer to this guide antonraharja.com/2016/03/17/setting-up-stunturn-server-on-meetme-id

    I just checked the link, and it looks to be only for Ubuntu, correct? If so, I have to find windows alternatives :) But, right direction!

  • If only the host can connect you need a TURN server,

    Refer to this guide antonraharja.com/2016/03/17/setting-up-stunturn-server-on-meetme-id

    If I am using the server from scirra for multiplayer, should it work since its peer to peer? The multiplayer setup I am using is counting the host as a peer so its one of those, everyone is a peer things, instead of a single computer acting as host.

    Do I still need an independent server anyway? I can connect via my phone (not LAN as I turn of wifi to test that). But another house (my daughter is helping me test at her moms), its kicking.

  • If I am using the server from scirra for multiplayer, should it work since its peer to peer? The multiplayer setup I am using is counting the host as a peer so its one of those, everyone is a peer things, instead of a single computer acting as host.

    Do I still need an independent server anyway? I can connect via my phone (not LAN as I turn of wifi to test that). But another house (my daughter is helping me test at her moms), its kicking.

    The server from Scirra for multiplayer still needs to be used. What the TURN server does is if the NAT traversal is unsuccessful (the connection is blocked by a firewall or something) then the connection will be relayed through a TURN server which both the HOST and the PEER connect to, to transfer data between eachother even if the connection was unsucessful .

  • > If I am using the server from scirra for multiplayer, should it work since its peer to peer? The multiplayer setup I am using is counting the host as a peer so its one of those, everyone is a peer things, instead of a single computer acting as host.

    >

    > Do I still need an independent server anyway? I can connect via my phone (not LAN as I turn of wifi to test that). But another house (my daughter is helping me test at her moms), its kicking.

    The server from Scirra for multiplayer still needs to be used. What the TURN server does is if the NAT traversal is unsuccessful (the connection is blocked by a firewall or something) then the connection will be relayed through a TURN server which both the HOST and the PEER connect to, to transfer data between eachother even if the connection was unsucessful .

    Gotcha, so instead of trying to figure out if my local network is blocking or not, or bypassing, the TURN server will do this for me and as long as I set it up correctly, it will do its job, correct? SO, at the moment, for preview testing on c3, it will either only work if on LAN, or if my own router configuration allows the connections, correct? And the TURN server is a way to simply configure this without you having to do too many changes to your internet setup?

    Thank you all for the understanding!

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