Notified book-keeper regarding new host

Today I had a look at the WebRTCMultiplayer api in Godot. It doesn’t appear to support what I need (all peers are equally important), so I’ve decided to transmit the information regarding lobby host from the signalling server to the book-keeper. In particular, I implemented that today, and deployed the new apps to their respective heroku locations (and also did another heroku run rake db:migrate for good measure).

Now it looks like the preliminary networking stuff is done save for tweaking the Godot client to communicate with the book-keeper and/or periodically poll it. A more optimal approach might be to only poll the book-keeper if a client leaves; however given that a client might not leave cleanly this probably would not work.

So probably I’d want to poll the relevant endpoint once every minute or so, and thereby indicate whether or not a new client is the host.

After doing that, I’d like to load a list of lobbies into the client UI so that a user can decide whether to join an existing lobby or start their own. If a user wishes to start their own, I should also allow them to give the lobby a sensible name, rather than a random string of characters.

Last but not least, I will want to ensure that there are not networking glitches between clients in my example scene when a game instance is eventually joined by a webrtc peer.

Tags: , , ,

Leave a comment