RiptideNetworking / Riptide

Lightweight C# networking solution for multiplayer games.
https://riptide.tomweiland.net
MIT License
1.04k stars 141 forks source link

Limit the amount of players #106

Closed NightfoxGames closed 10 months ago

NightfoxGames commented 10 months ago

Hey, i find it really cool what you created and im making my dream game with it! but is there any way you can limit the amount of players in one lobby?

Techyte commented 10 months ago

In the server class there is a field called MaxClientCount. You can also set it in the server start function, something like this; Server.Start(port, maxClientCount);. Just replace maxClientCount with whatever you want to limit your number of players too

Is that what your looking for?

tom-weiland commented 10 months ago

As @Techyte said, you can set the max client amount when calling Server.Start.

NightfoxGames commented 10 months ago

Thanks a lot! This is really what is have been looking for, now I just need a character selector and I’m done with the basics!