Multiplayer Problem.

  • Hi guys,

    Im messing around with the multiplayer plugin and I have built an extremely simple multiplayer game with it. It works pretty well, I can log in from my other computer and play. Everything syncs up and runs fine... for about a minute. And then the peer side seems to always loose sync, and freezes for bursts of time. There are no actions that would be causing this, as its very simple, and the controls work just fine until that happens. Anyone have a similar problem? Anyone know how to fix it? Oh, and its not a network issue either, it happens if I run the game in two browsers on the same machine as well.

    Thanks

    Adam

  • Without having a sample capx of your game, it is hard to tell if it is a problem in your game code or just your internet connection

    If you could share your capx, I am sure someone is able to help out on your problem.

  • Without having a sample capx of your game, it is hard to tell if it is a problem in your game code or just your internet connection <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    If you could share your capx, I am sure someone is able to help out on your problem.

    Hey,

    Here is a link to the file. https://dl.dropboxusercontent.com/u/5611065/Test.capx

    Thanks!

  • hmm, on IE and Firefox the game throws JavaScript errors on me after some time. I will have to let someone else have a look on your code, as I can't find a problem

  • hmm, on IE and Firefox the game throws JavaScript errors on me after some time. I will have to let someone else have a look on your code, as I can't find a problem

    Hey,

    Thanks for taking a look. Thats interesting. Is there any way you could tell me what error you are getting? It just starts acting weird and then freezes for me, but I never get any error messages.

  • mELTINGsKYsTUDIO - I think the problem is event 11. It's supposed to be a subevent to event 10 (check the original example). Because it's not a subevent it will run that action every tick, when it only needs to be run once. I checked the Multiplayer plugin and it will actually memory leak if you do this (meaning the game will slow down and eventually crash). I've fixed the memory leak for incorrect usage of the action for the next build, but you should still fix your events - only enable input prediction once, in a subevent to "on created".

  • mELTINGsKYsTUDIO - I think the problem is event 11. It's supposed to be a subevent to event 10 (check the original example). Because it's not a subevent it will run that action every tick, when it only needs to be run once. I checked the Multiplayer plugin and it will actually memory leak if you do this (meaning the game will slow down and eventually crash). I've fixed the memory leak for incorrect usage of the action for the next build, but you should still fix your events - only enable input prediction once, in a subevent to "on created".

    Hey,

    Thanks a ton! Im upgrading to stable now. But I think youre right, that seemed to fix it. I really appreciate the help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    Hey, thanks again for the help, but Im still having sync issues. I made a video. It seems to work fine for a bit again, and then it seems like they lose sync. The player will be on completely different parts of the map. here is the video

  • Ive tried several things, nothing seems to be fixing that. Not sure whats going on. If I turn input prediction off it makes the controls a little laggy (as expected) but they stay synced. Im thinking it has to be something with that.

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