How do I make collisions in a multiplayer game (peer side) not buggy and smooth ?

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello,

    I'm currently developing a multiplayer game that is already quite advanced. I was using the Photon plugin to handle the multiplayer, but after seeing the costs benefits of p2p and all the other features of the official Multiplayer plugin, I decided to switch.

    Pretty much everything works perfectly and is super smooth, but one issue remains.

    I first thought it was a bug, and you can see my bug report here. Here is the c3p I submitted (needs R215 at least)

    Basically, I'm using local input prediction for the peers, so it can hide the lag and prevent cheating. But, if a peer collides with a solid, it still tries to move a little bit, when it's completely stopped on the host side. On collisions around solids corners, it sometimes makes the peer moves past the object when it reality it should've stopped right away.

    Here are 2 gifs that show the issue.

    I tried to make so the collisions are disabled on the peer side and only rely on collision detection done by the host, but it makes the peer going almost entirely into the wall (like noclip) before going back to his normal position.

    My question is : has anyone done a multiplayer game using collisions and knows how to fix this issue ?

    Thanks :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i did an example , for tutorial page , maybe it can help

  • Hello rafaeltrigo,

    First, thanks for the help ! Unfortunately, I managed to recreate the issue on your project (peer managed to get on a platform when on the host side it was still on the platform bellow).

  • Small update :

    I tried as much options I could and unfortunately I did not find a solution. It's a shame because I really love the features that the official multiplayer plugin gives and pretty much all the multiplayer logic of my game is done but I can't fix this specific issue by myself (I'd have to disable local input prediction which can creates massive input lag as the peer is waiting for the host response to move).

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