How do I Multiplayer With the Physics

0 favourites
  • 7 posts
From the Asset Store
Take knife like a real thing and interact with it. Throw, rotate your weapon and etc.
  • In my game, I'm using the physics behavior for a custom platformer type gameplay. The problem I hadn't thought I might run into is that the physics behavior lags between the host and peer to a ridiculous extent. Obviously using input prediction only makes it worse, and makes the peer jump around quite a lot.

    I'm quite sure that my 7mbs dl speed is not the issue, but maybe the server I'm using is? I'm using the default Scirra server for now, because my game isn't even in beta yet, so I don't need a server yet. If this issue is because of the Scirra server, then no problems, I just have to see if there could be an issue with trying to send physics through a server, period.

  • Give Unity a shot. Our Photon project uses physics and we are not having any uncommon lag issues. Games like Rocket League use U4E without too much of a latency problem. IIRC they are using the noobie multiplayer FPS template that ships with U4e. They are also using the default Controller input module.

    Sorry i don't have an easy solution for C2.

  • Maybe Ashley has an answer?

  • Game data goes peer-to-peer so the performance of the Scirra server has no impact on the gameplay performance. There is nothing special about physics; as with any multiplayer game, only the host is really running the movement, and the peers are just seeing and controlling virtual versions of themselves (typically with all their actual movements disabled, so they don't conflict with the multiplayer engine's control of the object). You're probably doing something wrong, like leaving the behaviors enabled for the peers. Multiplayer is hard.

  • Game data goes peer-to-peer so the performance of the Scirra server has no impact on the gameplay performance. There is nothing special about physics; as with any multiplayer game, only the host is really running the movement, and the peers are just seeing and controlling virtual versions of themselves (typically with all their actual movements disabled, so they don't conflict with the multiplayer engine's control of the object). You're probably doing something wrong, like leaving the behaviors enabled for the peers. Multiplayer is hard.

    Haha I guess it's not the EASIEST thing in Construct 2. I hadn't tried disabling the Physics behavior though. I hadn't thought about that, since I was following the Multiplayer Game example that comes with C2. I can see why that'd be different though. Thanks for taking the time, Ashley, hope I didn't disturb ya.

  • I don't get it... Disabling the behavior on the peers side didn't work, which makes sense, as it's basically just a copy of the object from the Host. The host tells the peer whether the behavior is enabled or not, so it seems, and disabling the physics didn't do anything. I was doing something wrong, the values for the movement were different for the peer and host, so the input prediction was off, because it wasn't the same...

    Again, thanks though..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, sorry for all the confusion. I'm gonna guess you knew better, the peer can control whether the behavior is enabled or not. I wouldn't recommend it though, without input prediction, multiplayer is useless.

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