Open ywgATustcbbs opened 2 years ago
Allowing dedicated servers to use the Steam Datagram Relay is something I want to do, but it requires engine changes.
Allowing dedicated servers to use the Steam Datagram Relay is something I want to do, but it requires engine changes.
Dedicated servers and lobby games( or in-game hosted servers) works fine. Lobby games are dedicated servers with steam networking while without some functionalities.
Lobby games are easy to host and have some capabilities of NAT passthrough. This makes it quite suitable for home users as steam account is free and home brodband connection will only get one public ip (in some cases, no public ip is assigned by default, like in China). But users can connect to a lobby game behind nat devices via steamnetworking (although it's half broken). Most players plays on win10, and have hardwares more powerful than cheap cloud vms. A hyper-v machine running on a gaming rig is smoother than most cloud vms. I experienced some dedicated servers and they became laggy when there were a lot of aliens or adrenalines. But using local hyper-v was quite smooth(if not kicked).
My idea is, why not make the lobby games behave more like dedicated servers? More players(12 or 16), host cannot be kicked, auto assigned lobby leader, show custom lobby names(or host account names), etc. Not sure but i guess these functions are bind to game logic, not engine built-in.
The hostname
variable exists on the listen server, but listen servers don't talk to the Steam master list of game servers, so the hostname won't be visible anywhere. We could do something like Deep Rock Galactic where users can name their listen servers, but our lobby list UI is already pretty full.
If you're not actually playing in a lobby, a dedicated server would be better (no host account to kick, take up a slot, or end up being an AFK leader), but as you've said, the public IP requirement makes that a problem. If I can figure out a way to trick the engine into using ISteamNetworkingSockets
(as opposed to ISteamNetworking
, which is deprecated), the public IP requirement can be removed.
One thing I've been considering is adding a way to mark yourself as a "hard spectator" (as opposed to the current "soft spectator" where you start the mission with no marines). "Hard spectators" would show up in a separate list during briefing, not be able to be leader, and not have a Ready button. If I do end up adding that, the SourceTV bot would be one.
The max players for created lobbies can technically go up to 32 but we limited it to 8 due to network bandwidth concerns.
And as you've said, the listen server host should not be kickable.
Listen server host is no longer kickable: 46d8336b2576901b4bf9cd80cb26e0dbae21e992
The
hostname
variable exists on the listen server, but listen servers don't talk to the Steam master list of game servers, so the hostname won't be visible anywhere. We could do something like Deep Rock Galactic where users can name their listen servers, but our lobby list UI is already pretty full.If you're not actually playing in a lobby, a dedicated server would be better (no host account to kick, take up a slot, or end up being an AFK leader), but as you've said, the public IP requirement makes that a problem. If I can figure out a way to trick the engine into using
ISteamNetworkingSockets
(as opposed toISteamNetworking
, which is deprecated), the public IP requirement can be removed.One thing I've been considering is adding a way to mark yourself as a "hard spectator" (as opposed to the current "soft spectator" where you start the mission with no marines). "Hard spectators" would show up in a separate list during briefing, not be able to be leader, and not have a Ready button. If I do end up adding that, the SourceTV bot would be one.
The max players for created lobbies can technically go up to 32 but we limited it to 8 due to network bandwidth concerns.
And as you've said, the listen server host should not be kickable.
Spectator mode will be a perfect solution. If possible, please allow a player to switch between spectating and playing.
Considering some players have high bandwidth >100mbps, letting the host to select max player number (including spectators) would be nice. Or at least allow a player to join and spectate a lobby game until he gets a player slot. There are always some people want to join and queue a game with many players, not a game with only one or two players. Or they want to queue and play in a low ping smooth host.
Also, the detail info page of the lobby browser clould be used to display some information. For some people, after playing some time, he knows some hosts have smooth experience and regular online time that he wants to join again. Steam friend is an option, but in some cases, both are free accounts or one doesnt want to add friend. Show host account name instead of created by valve in detiail page would be a better choice.
If I can figure out a way to trick the engine into using
ISteamNetworkingSockets
(as opposed toISteamNetworking
, which is deprecated), the public IP requirement can be removed.
Maybe if we can decorate the method in CSteamAPIContext
, passing ISteamNetworkingSockets
but decorate it, and keep that class compatible with ISteamNetworking003
.
m_pSteamNetworking = (ISteamNetworking003 *)SteamClient()->GetISteamNetworking(hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION_003);
Need to dig a bit deeper I guess.
Is it possible to name a lobby and display in the lobby browser?
Hosting a dedicated server might be difficult for many people. Public ip is a big problem. In most cases, a home connection will only get one ip. But hosting a 7x24 lobby will be easy. I used a spare steam account in a hyper-v machine. It worked very well. Until my account was kicked by some noob players due to "observing".
Or, we can try to show the account name of the lobby host. In this way, we can change the account names.
Moreover, it would be usefull to automatically give the leadership to an active player if the leader afk for a long time. Perhaps add an AFK menu option? In many dedicated servers, if an afk player takes the leadership and there is only two players, or the afk players are more than 60%. Others have no choice but to quit the server.
if the lobby allows 12 or 16 players, it is almost the same as deeicated servers
Also, we can add a feature that the lobby host cqnnt be kicked.