How to make communication like Jackbox Games does?

Hey Everyone!
I recently thought it would be cool to try and make a game like Jackbox Games. If you haven’t heard of Jackbox before, pretty much one device is a “Host” and hosts the actual game, while other devices are the “players”. In the example of a trivia game, the “Host” would show the question and 4 answers, and each of the “players” would choose on their device. The problem with this is I don’t know how the players would be able to connect with the host, or send info back and forth. I’m thinking it might be easy to just have a “Host” or “Player” option in the game lobby, and maybe use P2P for the connection, but I’ve never used P2P so I have 0 idea how this works!

If anyone has any ideas or knows how even just part of it would work, lemme know!

Thanks!
– Snowy

I’d recommend looking into firebase Firestore, it’d probably be the easiest :3 P2P is cool, but it is more optimized for action games and has hosting complexities (setting up a TURN server) if you don’t want the game to be broken for people with strict firewalls.

Firebase Firestore lets you watch a document, which is basically a structure variable, and do something whenever it changes, so you can easily let the host write a structure to control the client’s interface, then the players can write their responses into a child of the structure that the host can use to get their responses :ㅤD

4 Likes