Fast-paced 2D Arena Shooter on Mobile - Is it even remotely feasible?

Options
For the last couple of weeks I've ben using PUN2 (Free) and a couple of other assets (not related to networking) to prototype a 2D 8Bit-Megaman-esque Arena Shooter and I've reached the stage where I need to synchronise the player position with interpolation, extrapolation and lag reduction.

Unfortunately, none of the methods I've tried so far gives me adequate results: I have tried the PhotonTransformView and PhotonTransformViewClassic in conjunction with PhotonRigidBody2Diew (with all options like SynchronizeValue, Lerp and with and withouth extrapolation options) and my own IPunObservable implementation.

The base of my IPunObservable is as follows:

void IPunObservable.OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
     if (stream.IsWriting)
     {
          stream.SendNext(transform.position);
     }
     else
     {
          networkPosition = (Vector3)stream.ReceiveNext();
          // other techniques like lag reduction and buffering are omitted from this snippet
     }
}

protected override void Update()
{
     if (photonView.IsMine == true)
          EveryFrame();
     else
     {
          float speed= 6.0f;
          transform.position = Vector3.Lerp(transform.position, networkPosition, Time.deltaTime * speed);
     }
}
It seems that the horizontal interpolation (a.k.a movement) works as intended, but as soon as my players are moving vertically (jumping or falling) it all falls apart like the/a house of cards.

The closes I've come to a almost flawless experience is the implementation from this site http://www.gamieon.com/devblog/post/11/a-script-for-syncing-transforms-using-photon-networking but these result do jitter around heavily from time to time.

All these test has been locally on my computer or between my computer and a laptop on the same LAN and I don't even know if I dare to test this on mobile.

Before I even try to "fix" these issues - Is it even remotely feasible to implement this kind of game on Mobile Devices?



Comments

  • Bytewizard
    Options
    Well - A nights sleep and a pair of fresh eyes seems to have solve the issue (for now) - my asset wasn't using the rigidbody.velocity value which I took for granted.

    Seems to be working "more adequately" now - perhaps I'll be back