Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bekiryanik · Mar 01, 2015 at 10:13 PM · multiplayergoogle play gamessynchronizationcrossplatform

How to Synchronize Play Services Real-Time Multiplayer

Hello,

I have a cross platform real-time multiplayer project. I have synchronization problem between iOS and Android devices. There is no huge differences but, there is a little bit differences and this causes problems in the game. The game should proceed on both platform at the same time. How can i solve this synchronization problem? I searched it on the Internet and i couldn't find enough information.

Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bekiryanik · Mar 01, 2015 at 11:16 PM 0
Share

Yes, they all connect to the same server which is server of Google Play Game Services. Game proceeds as this; for instance when the game is started, both characters(one of them is connected from android device and the other one is connected from iOS device) starts running automatically and it seems that the character which is on Android device, goes in front of the other character which runs in iOS device. Both of the characters speed is the same but their position is different in the game. They should go in the same line. I need to do something like; 3-2-1 and Go and both device should take the signal from the server(this is just an example of a way to solve this problem but i don't know how to do that) and starts running according to this signal.

About lag; actually there is no lag. Just a little bit difference of working of the game and i need to synchronize game to solve this.

Thank you so much!

avatar image RastaCre · Aug 17, 2015 at 10:08 PM 0
Share

Hi There,

I was wondering if you managed to find a solution to this issue.

I'm working on a similar setup (3-2-1-GO) and depending on network speeds the various players end up having various degrees of lag.

Any pointer?

Cheers Cre

avatar image bekiryanik · Aug 18, 2015 at 06:41 AM 1
Share

Hi Rastacre,

I couldn't find any solution because i hold over that project after this issue. But if i find any solution to this, i will try to explain that in here.

avatar image RastaCre · Aug 18, 2015 at 08:15 AM 0
Share

Hey Bekiryanik,

thanks for your reply.

I started tinkering with this problem and I came up with an idea, but still didn't have a chance to implement it.

So the idea is:

  • when all the participants connect the one that initiate the game sends out a packet with the game settings for the current game

  • when the other players receive the packet they all send back a ready state packet telling the host they are ready to go.

  • On receive the host sends back its own ready packet and once everyone is on the ready state the game starts

All the packets must be sent as reliable here to make sure they arrive and they also arrive in sequence.

There is one issue with this: when the hosts sends the last ready packet, the hosts itself knows it is ready to go (and all the participants) but we don't know if and when the other participants will receive the ready packets themselves... so this might sync the participants but still have the host starting the game earlier.

Anyway I'll try to come up with something more concrete and I'll let you know if I find a solution.

Cheers

avatar image RastaCre · Aug 18, 2015 at 08:49 AM 1
Share

I found something:

http://www.raywenderlich.com/89724/creating-cross-platform-multiplayer-game-unity-part-4

this is part 4 of a whole tutorial based on the Google Play Games services. It's pretty good, loads of solutions to various problems.

Somewhere at toward the end there's a section called:

Synchronizing Game Start

Which has a much more complex, but better solution that the one I came up with... :)

Hope this helps.

Cheers

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

[PhotonNetwork] How can I stock a allocateViewID from a player and reuse it later with another player ? 2 Answers

[UNET] Unable to run [Command]s on remote client 1 Answer

Google Nearby Unity API crash 0 Answers

Photon objects not syncing 1 Answer

Google Play games Services Multiplayer 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges