Bullets in multiplayer are starting out ahead of the peer

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • When the peer is moving and shooting bullets, on the peer screen the bullets look like they're coming out ahead of the peer's movement. On the host screen they look fine, and the host's bullets look fine on both screens.

    my events are like this:

    on start

    sync peer... sync bullet (both position only normal bandwidth low bytes)

    peer

    move

    if (shoot key pressed) send input bit for fire to 1

    host

    move

    move peer

    if (peer input bit for fire is 1) spawn bullet on peer

    How do I get the bullets to come out the same on the host and peer screens? This is on the same computer with zero lag so...

  • After close investigation I found the peer is lagging behind in movement by about a quarter second. I removed the enable predictive input call and now it works fine. It's a teenie bit choppy on the peer but moves ok and the bullets match up just fine. The multiplayer predictive input thingy was making it lag behind.

    Judging from other people's posts on the subject it seems like enable predictive inputs only really works for 8 directional movement or movement that doesn't involve outside forces like gravity or physics.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you send "capx" example?

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