Search code examples
androidmultiplayergoogle-play-games

Google game service real time multi game in one app


I am developing an android application with two games. I have configured one game as real time. But is it possible to configure second one also as real time with different ids. So these two should not conflict with each other


Solution

  • You shouldn't set it up differently (or with different IDs). For you it would be enough to use different criteria when creating a room for those two games.

    You should go through this and related parts of the documentation:

    https://developers.google.com/games/services/common/concepts/realtimeMultiplayer

    When configuring the room, you can use:

    public RoomConfig.Builder setVariant (int variant);

    the 'variant' is the filter for different game types. In your case you can use 1 for one game, and 2 for the other, for example.