Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Creating a Cross-Platform Multiplayer Game in Unity — Part 4

In this final part of the series, you will deal with clients sending messages out of order and the various ways on how to deal with them.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/2011-creating-a-cross-platform-multiplayer-game-in-unity-part-4

Hello!

Thanks a lot for making this tutorial. I have an issue though that i was hoping i could get some help on. I’ve been having a lot of issues over the last few days trying to get my animations to be viewable by both clients (on android devices) when i get a multiplayer game started. I’ve managed to get the code working so that the left and right movement of my player character is visible on both devices. But when i try to play an animation of the character (which is done by clicking a button), the animation is only viewable on one screen and not the other. What’s odd to me though is that my idle animation (an animation i have set as the default) works on both screens, which i don’t quite understand. Also note that my character is divided up into several pieces (ex… a head, torso, upper leg, lower leg, etc) which each have their own rigidbody and box2dcollider, and i put them all together like a skeleton as children of a parent object which groups them and allows me to move each individual piece to create my own animations right from unity. Again, the problem is that i just can’t get each of these animations to play on both screens. I was hoping to get some help on this, as it has stumped for days. I’m kind of a beginner to this networking stuff so I’d appreciate the help. Thanks!

When you trigger the animation on one device, the other device has no clue it is occurring. So the first device must tell the other that X animation needs to start happening. So instead of using an U or F in this example for Update / Finish, you create your own abbreviation (a for animate?) and send the update.

Thank you todd , i was searching for a good tutorial for google multiplayer .

Thank you Sir , for a beautiful and informative tutorial. Sir, i am developing a card game similar to hold em poker. i have to ask that

  1. how can i easily integrate Facebook friends for matchmaking while using google play services…??
    2.What you think about Gamesparks and photon…??

One question when we restart game after game over then no data sending if sending then after few seconds ? what’s problem?

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]