Multiplayer game

Hi

Can anyone give some logic, on how to connect two players or users on one app using Firebase?

I just creating a multiplayer quiz so I want to pull 2 random players in one room.

@Gamer_Ak

In your Logic make the Rooms like Binary Tree

ROOM
Request User 1
Request User 2
Close Room

and Store Unique IDs of your ROOMs

In Firebase make a BUCKET of Room IDs and
2nd Bucket to Store Users and ROOM ID Allotted

Do something to allot those IDs to your USERS

1 Like