Google Play Games Services Realtime Multiplayer Test 2

Channel:
Subscribers:
39,800
Published on ● Video Link: https://www.youtube.com/watch?v=oXrk9QUU1j4



Duration: 2:41
357 views
2


Currently I'm making simple Master/Sub Client System with Google Play Games Services Realtime Multiplayer.

GPGS only supports way to send data and receive, it is hard to make game with it, especially PvE kind of game.

My next project should be PvE, using GPGS, this might be helpful.

There are two kind of objects, NetworkObject and plain object.
Plain object is just a GameObject. Instantiate GameObject from GameManager will automatically send signal to other clients to needs to be create same GameObject to their own game.

Another, NetworkObject is controlled by GameManager. NetworkObject has two jobs: handle data to transfer and handle data to receive. For instance, NetworkTransform Component broadcast transform data from Master Client, and Sub clients will receive the transform data and update locally, with proper interpolation. But you can make NetworkObject to "client side" only, this flag will not broadcast anything, but still in control by GameManager. So that the player leaves the room, these NetworkObjects will automatically removed, even it's client side only.

But PlainObjects still remain there, you have to handle it properlly.

This project is still updating, and I will put lots of useful stuffs like Audio Sync, transfer ownership, custom Network Components for exchange data that you created in specified component.

It's tested with my cellphone in realtime, in this video the emulator was Master so everything works right after broadcast, but in Sub client there is a little latency before message comes.







Tags:
Unity
Google Play Games Services
Multiplayer
Android