New Multiplayer 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!
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

New Multiplayer Lobby

Post by m1ndgames »

Actual Lobby System:
New Player chooses a nickname, picks a game and the stats are stored locally.

New Lobby Server System
User Registration (User Database System)
New Players register online with a user/pass combination, this can either be throu a webinterface or ingame. (i dont know if changes to the game ui are easy to handle.) Maybe adding the email adress aswell would be a good idea for password resets?!

A player database would bring a lot improvements... Because every player is tracked, we could collect real game statistics and implement something like a ingame friend-list, a ladder system, better ranks, rewards, and even a report system for cheaters... (I thought of a way to prevent cheating by sending false data too, but that will not be discussed here)
The game statistics are there, they have only to be transported to the lobby server after the game ends. Disconnects count as a loss and will saved in the db beside the main count, more statistics for the website! :]

--

I would really like to help you but my c skills .. oh well.. I can read and understand code but besides that.. Im lost in
cheat sheets.. My real love is Perl :)
And in the last years ive coded some client/server scripts, even with mysql connect... so the server side coding part wouldt be a problem.. for the start, i need a bit help... can someone compile me a 2.3 warzone win32 version that connects to the lobbyserver on localhost? ive tried building 2.3 and trunk on ms vs, cross-compiling on ubuntu didnt work... (i cant use ubuntu atm because my intel onboard drivers are bugged in the lts release and starting anything 3d is a pain...)

So.. the first thing todo would be scripting the user/pass login routines with a database connect. (I guess mysql is the choice?), after that i would write the game-routines and have to check whats sent to the lobby and back (hm.. i guess i just sniff it before then..) The whole Eye-Candy stuff is more design then scripting.. and can ofcourse be done later, a short user/pass script in php shouldnt be the problem here...

That was just a short brainstorm... Leave critism and /or comment if you like the idea... :]
and sorry if i made some mistakes, english isnt my native :)
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

I just realized this has been suggested before in another thread, maybe we could use this one for further discussion...
Fastdeath wrote:
Giel wrote:Currently the lobby server doesn't at all deal with game stats. So if your goal is to implement a failover I definitely wouldn't suggest implementing some kind of stat handling storage facility.

The only goal the lobby currently serves is for players to easily find each other.
Sorry, for didn't telling that. I want server side stats later to, if others agree to that.
This can help us building up a community website with player stats/rankings and so on,
also users can't change stats on clientside after.

If you and others agree to that, i will develop to complete server side things required.
Hm.. dont know if youre on it, maybe we can team up? Or you do it? Or me?
Just all leave a Message and tell us how it should be done! :D
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: New Multiplayer Lobby

Post by stiv »

can someone compile me a 2.3 warzone win32 version that connects to the lobbyserver on localhost?
masterserver_name in the config file.
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

stiv wrote:
can someone compile me a 2.3 warzone win32 version that connects to the lobbyserver on localhost?
masterserver_name in the config file.
duh :lol2:
thank you!

as a developer.. do you think i should just start a simple lobby server to show basic functions or do you have some regrets, for instance... the used language (perl)
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

im currently writing the lobby server, messing around with stuff and getting a nice base...

at the moment the server is accepting multiple connections and can parse xml encoded queries (took the idea from here, but used xml instead of JSON because its easier for me to parse and it doesent differ much to the example shown in the link)

some samples:

Code: Select all

$BADWORD@m1ndbox:~/workspace/lobby_server$ telnet 92.72.39.207 9990
Trying 92.72.39.207...
Connected to 92.72.39.207.
Escape character is '^]'.
# Server sends "connected" and "lobbyversion $lobbyserver-version"
connected
lobbyversion 1
# my input (list games)
listgames
# Server Output (No Games in Database)
no games
# my input (add a game by sending a xml query)
<lobbyquery><command>addgame</command><hostip>10.0.0.1</hostip><hostport>2100</hostport><hostversion>2.3</hostversion><map>SK-Rush</map><maxplayers>4</maxplayers><players>1</players><techlvl>T1</techlvl></lobbyquery>
#  my input (list games again)
listgames
# Server Output (Games in Database)
<lobbyquery><hostip>10.0.0.1</hostip><hostport>2100</hostport><hostversion>2.3</hostversion><map>SK-Rush</map><maxplayers>4</maxplayers><player_id>3</player_id><players>1</players><techlvl>T1</techlvl></lobbyquery>
# my input (chat message broadcast: chat 'text')
chat this is a test
2nd Client:

Code: Select all

$BADWORD@m1ndbox:~/workspace/lobby_server$ telnet localhost 9990
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
connected
lobbyversion 1
# Server Output, chatline from client with id 3
3: this is a test
So its allready possible to store games, list them and chat with other connected users. Currently im working on the changegame function that allows the hosting client to send back changes like the map, or the connected users. Because of this, the (to be done) ingame server browser could display anything like map, mod, count of connected players etc.

Planned things like a user/game sql-database is really easy to implement but i left it out for easier testing purposes...

i hope you like the concept of this new lobby server, critism and discussion please!
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

* Added IRC Connect to print new Games, or list games or users by command (!listgames, !listusers) (bot test @ #warzone-lobby)

- Another thread about lobbyserver netcode

JSON <-> XML ?

JSON:

Code: Select all

{
    "lobbyquery": {
        "version": 1,  // Protocol version, not game-version.
        "query": {
            "command": "add",
            "name": "MyGameName",
            "map": "SK-Rush",
            "players": 4,
            "tech": "T1"
        }
    }
}
XML 1.0:

Code: Select all

<lobbyquery>
  <command>addgame</command>
  <hostip>10.0.0.1</hostip>
  <hostport>2100</hostport>
  <hostversion>2.3</hostversion>
  <map>SK-Rush</map>
  <maxplayers>4</maxplayers>
  <players>1</players>
  <techlvl>T1</techlvl>
</lobbyquery>
User avatar
Crymson
Trained
Trained
Posts: 289
Joined: 18 Mar 2010, 21:08

Re: New Multiplayer Lobby

Post by Crymson »

m1ndgames wrote:Actual Lobby System:
New Player chooses a nickname, picks a game and the stats are stored locally.

New Lobby Server System
User Registration (User Database System)
New Players register online with a user/pass combination, this can either be throu a webinterface or ingame. (i dont know if changes to the game ui are easy to handle.) Maybe adding the email adress aswell would be a good idea for password resets?!

A player database would bring a lot improvements... Because every player is tracked, we could collect real game statistics and implement something like a ingame friend-list, a ladder system, better ranks, rewards, and even a report system for cheaters... (I thought of a way to prevent cheating by sending false data too, but that will not be discussed here)
The game statistics are there, they have only to be transported to the lobby server after the game ends. Disconnects count as a loss and will saved in the db beside the main count, more statistics for the website! :]
Are we talking forum accounts?
I also don't know how you could stop cheating, since as soon as it enters the codebase, then anyone can come up with a way to bypass the checks.
I would really like to help you but my c skills .. oh well.. I can read and understand code but besides that.. Im lost in
cheat sheets.. My real love is Perl :)
And in the last years ive coded some client/server scripts, even with mysql connect... so the server side coding part wouldt be a problem.. for the start, i need a bit help... can someone compile me a 2.3 warzone win32 version that connects to the lobbyserver on localhost? ive tried building 2.3 and trunk on ms vs, cross-compiling on ubuntu didnt work... (i cant use ubuntu atm because my intel onboard drivers are bugged in the lts release and starting anything 3d is a pain...)

So.. the first thing todo would be scripting the user/pass login routines with a database connect. (I guess mysql is the choice?), after that i would write the game-routines and have to check whats sent to the lobby and back (hm.. i guess i just sniff it before then..) The whole Eye-Candy stuff is more design then scripting.. and can ofcourse be done later, a short user/pass script in php shouldnt be the problem here...

That was just a short brainstorm... Leave critism and /or comment if you like the idea... :]
and sorry if i made some mistakes, english isnt my native :)
In the config file, you can point it to new master server as stiv said, so no need to recompile the current 2.3 build for a new local host.

If you are using forum accounts, then you have to find out what database the forums are using, and use that. You would also need to have server access, so perhaps it is best to e-mail Kamaze and ask him what he thinks of your plan?

If they will be hosted on your system, then you would need to convince everyone to use your server instead of the current one, and have the devs add support for what you are looking for. I think there is another thread about someone else suggesting this, but I don't think he ever got a good response, which may mean that you are wasting your time. :(

From looking at the python file, you need to contact one of these devs
# MasterServer v0.1 by Gerard Krol (gerard_) and Tim Perrei (Kamaze)
# v1.0 by Freddie Witherden (EvilGuru)
# v2.0 by Gerhard Schaden (gschaden)
# v2.0a by Buginator (fixed endian issue)
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

Doesent look like youve read all postings ;)

btw.: ive spoken with kamaze allready but he doesent have time to spare on this...
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

*push*

I would like to work on this.. badly!
But... i need input from your side! Tell me how you want the new lobby server to be build.. at this point... its already waiting for clients, it can store games and parse to irc + it has a lobby chat.

users: tell me your most wanted features

devs: tell me how i should build it (client <-> server communication process (its xml atm)

it would be so cool if a developer would like to team up.. me on the server/database side, him/her on the client side...

please drop me a note, critics or suggestions!
User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA
Contact:

Re: New Multiplayer Lobby

Post by macuser »

hmm nice idea. Suggestions:

1. perhaps have the player database use the forum logins
2. in chat have a "lobby" chat where the chat is over irc (#warzone2100-games)
3. have player "ratings" where the game host can "rate" player who cheat badly or rate experienced players well

just suggestions

-regards macuser
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

1. perhaps have the player database use the forum logins
no problem, if i remember right kamaze is the webmaster?! i will contact him but... i guess he wont let me because i need access to the database (i wouldnt give out the login data to a unknown community member)

but maybe he can supply me with the database structure so i just build my own test-db
2. in chat have a "lobby" chat where the chat is over irc (#warzone2100-games)
thought of this but this is really a client-side thing... i have implemented a flood protection to my irc parser but if someone spams, all the messages get delayed for a long time, if i would add a irc connection for any user, the lobby server host will get booted because of too many connections
3. have player "ratings" where the game host can "rate" player who cheat badly or rate experienced players well
no problems with that, but its website related and can be done out of the user database.. the lobbyserver has nothing to do with besides supplying the data to connected clients, if we choose to make the data avaiable from inside the game... i wouldnt allow rating by the host because this can be exploited... you could get a bad reputation just by joining a game. maybe a comment or ++/-- rep button on the website would be better
Last edited by m1ndgames on 05 Jul 2010, 19:25, edited 1 time in total.
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: New Multiplayer Lobby

Post by KukY »

Well, only things I really care for are that lobby doesn't go out of sync, and that it has a nice, fast chat, both in the lobby and in each game separately.
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

the ingame chat is handled by the warzone client, because the games are stored in a database and the game data gets send when a client requests it... it cant really get out of sync. (ithe server drops the game if the port isnt reach-able anymore, the check interval is 5 seks). the lobby chat is fast too, and has a flood protection as well.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: New Multiplayer Lobby

Post by Zarel »

I'd recommend JSON for communication. Just so I could write a web interface easily. :P
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: New Multiplayer Lobby

Post by m1ndgames »

i had a xml parser function ready, thats why ive used it, but... no problem to build a json parser, ill change it!

we (or you as the devs) should think about how the string should look like, e.g what data gets send between client and server.
Post Reply