poki / netlib

The Poki Networking Library for online multiplayer web games!
ISC License
37 stars 27 forks source link

Get custom lobby data when you join a lobby #85

Closed aglitchman closed 2 weeks ago

aglitchman commented 4 months ago

Currently, you can only get customData from the lobby list and only for public servers. It would be great if a player could get this data when joining by lobby id.

What is the use case? For example, this data could store initial data about the game world. The player when joining could immediately start creating a world based on it. Without this data, the player needs to first wait for the player who created the server to connect as a peer, and get this data from him. This can take a long time if there are more than 1 player.

*Related to https://github.com/poki/netlib/issues/75

koenbollen commented 4 months ago

Hey @aglitchman, Very valid point. We've started work on implementing this and will most likely finish this next Friday (no promises ofc). Will keep you posted here.

erikdubbelboer commented 2 weeks ago

This has been implemented, I'm going to push a new version to npm in a bit.