Skip to content Skip to sidebar Skip to footer

Googleapi Real Time Multiplayer Pushing Updates

i am using the Google Api to create a Real Time Multiplayer - Top down shooter game with libGDX. Player positions are send over 'sendUnreliableMessage' on every call of the 'render

Solution 1:

If we rely purely with Sending game data, the way I understand it, you can implement sending data messages using the two messaging protocols provided by Google Play games services.

To answer your questions:

1. Updating the Player position like this is way to often right ?

You may still opt to use either of the two given messaging protocols. Just choose which suits you best, however, please note that your app is responsible for ensuring that the game behaves correctly if messages are dropped in transmission or received out of order.

2. Shots are getting lost. 1-3 of 4. Which is around 50-80% package loss.

With reliable messaging, data delivery, integrity, and ordering are guaranteed. You can choose to be notified of the delivery status by using a callback. But, to avoid losing some updates, please also note that there's a maximum size of messages that you can send for both reliable or unreliable messages.

In addition to what was given in the documentation, suggestion in this SO post - Real Time Multiplayer Best way for pushing updates on android might also help.

Post a Comment for "Googleapi Real Time Multiplayer Pushing Updates"