netlib
netlib copied to clipboard
Add an extra field when creating a lobby that you can use for your own purposes
Use case for this field: players will be able to name lobby (rooms) if the game has a menu with a list of all lobbies to join.
Now the list() command will only return lobby IDs and the number of players, which looks unattractive. The point of this feature request is not to use any extra DB to maintain your own list of lobbies.
P.S. Plus, the netlib server deletes empty lobbies, so it would be impossible for players to remember a specific game session by lobby ID, since the host player would have a new one after a while.
We should really work on some documentation. Lobbies currently have a customData object where you could put a "name": "..." into and use that. It should also be returned by the list endpoint.
Lobbies currently have a
customDataobject where you could put a"name": "..."into and use that. It should also be returned by the list endpoint.
Yeah, and I see that database has meta field for custom data, but create command doesn't insert any custom data into the db.
Will it be implemented in the future? Probably, custom data should be filtered by some basic filter, at least by the size of the data. So that a hypothetical attacker doesn't flood the server with a huge amount of data.
This will be our next step that we'll be working on next week.
Closed by https://github.com/poki/netlib/pull/84
Many thanks!