Display number of players in the lobby

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
Post Reply
erik_l
New user
Posts: 2
Joined: 09 May 2017, 10:00

Display number of players in the lobby

Post by erik_l »

I often find myself waiting for players and/or games in the lobby, wondering if it's really as empty as it looks, or if there are other players watching the same empty screen as I am. Also when hosting a game, it would be nice to know if there are any players waiting in the lobby that are able to join.

My suggestion is that the number of players currently in the lobby (not in already started games) is shown, both on the lobby screen and on the host game screen. Preferrebly the number of players that actually are able to join, ie. on the same version as I am.
ZotaNexus
New user
Posts: 2
Joined: 16 Apr 2017, 20:46

Re: Display number of players in the lobby

Post by ZotaNexus »

JUST DO IT, please :P
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Display number of players in the lobby

Post by vexed »

Do what?

There is no lobby per se.
It is all P2P, so, there isn't once centralized place where everyone joins waiting for games, so what is asked of, is impossible.

The best you can do is join #warzone2100-games (on IRC), and meet up there and plan games that way.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Display number of players in the lobby

Post by NoQ »

I guess it could be something like "number of unique ip addresses who obtained the list of games in last few minutes".
MIH-XTC
Trained
Trained
Posts: 368
Joined: 31 Jan 2014, 07:06

Re: Display number of players in the lobby

Post by MIH-XTC »

I think the problem is that checking for unique players is done at the OS level on the lobby hosting server since WZ is p2p and then somehow that information needs to get patched into WZ the application which implies a dependency between WZ’s code and the OS of the lobby server. You can setup a cron job on the lobby server to run netstat and keep track of the unique connections on port 2100 and output to .txt, then have WZ read from that file but if the lobby server OS were to ever get reinstalled, then WZ’s code is dependent upon a batch job that no longer exists. It’s not a big deal to recreate the job but it’s just unsettling to think the applications code is dependent upon the OS in that manner. Not sure if that’s considered a bad practice or not.

Is there another way of doing this?

EDIT: Does the lobby server run a special instance of WZ to act as the lobby?
User avatar
Terminator
Regular
Regular
Posts: 1077
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Display number of players in the lobby

Post by Terminator »

Kaff ... Kaff :ninja:
:arrow: click here
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Display number of players in the lobby

Post by vexed »

NoQ wrote:I guess it could be something like "number of unique ip addresses who obtained the list of games in last few minutes".
Usually, when the list of games is sent, people join one of those games in the list, so, they are no longer waiting, and wouldn't be counted, but, I still don't see the point of this information.

What usually happens is they click like mad on the refresh button, nothing appears, and they do something else.
When a host decides to host, they stay on the server, until the game fills up, or they quit because of not enough people.

Right now, we tell people how long it has been since the last game that was hosted was.

Lobby is the wrong terminology for what is going on, the only time people are actually in a lobby is when they join a game.
MIH-XTC wrote:I think the problem is that checking for unique players is done at the OS level on the lobby hosting server since WZ is p2p and then somehow that information needs to get patched into WZ the application which implies a dependency between WZ’s code and the OS of the lobby server. You can setup a cron job on the lobby server to run netstat and keep track of the unique connections on port 2100 and output to .txt, then have WZ read from that file but if the lobby server OS were to ever get reinstalled, then WZ’s code is dependent upon a batch job that no longer exists. It’s not a big deal to recreate the job but it’s just unsettling to think the applications code is dependent upon the OS in that manner. Not sure if that’s considered a bad practice or not.

Is there another way of doing this?

EDIT: Does the lobby server run a special instance of WZ to act as the lobby?
In a nutshell, all the server does is, when a host connects, it sends the needed info for that game, and holds onto that info until the host quits/starts a game.
When a player connects to said server, all they get is a list of games currently waiting for players (which has everything needed to connect to said host(s)).
When a player clicks on one of those games, they connect directly to the host, the server isn't touched again by the clients.
The host does notify the server that there is 1 more player, so it will update the stats the next time a game list is requested.

All this is done via python using a modified version of https://github.com/Warzone2100/wzlobbyserver-ng It really is quite trivial.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
erik_l
New user
Posts: 2
Joined: 09 May 2017, 10:00

Re: Display number of players in the lobby

Post by erik_l »

vexed wrote:
NoQ wrote:I guess it could be something like "number of unique ip addresses who obtained the list of games in last few minutes".
Usually, when the list of games is sent, people join one of those games in the list, so, they are no longer waiting, and wouldn't be counted, but, I still don't see the point of this information.
The point is that it would give me an idea of the amount of activity in the lobby. Also, if I'm hosting, the information would also tell me if there are people obtaining the game list, and still not joining my game, perhaps I should change some setting in my game to attract players. Given how things work according to the above posts, I think NoQ's idea seems like a good one. It would answer the question "Are there players who could join my game but don't, or are there simply no players here".
.
Post Reply