About lobby

Discuss the future of Warzone 2100 with us.
User avatar
Tzeentch
Trained
Trained
Posts: 313
Joined: 14 Oct 2012, 14:24

Re: About lobby

Post by Tzeentch »

" or anything like a rank/ladder system that isn't server side." - good point, I'm assuming doing this is quite difficult to setup as well.

"If there are people who DDoS an open source game, then those are most likely the enemies of such together closures.
Splitting the servers is an possiblity. Might be an bigger expense, but you can calculate the price of an good combination yourself, that's profitable." - ddos open source seems low to me, hard to understand the intention. Splitting server as I was touching on having reliability being an important aspect. I'd like to understand about the server's we've got. all running on some low end hardware in a DC or a few spread about amongst datacentres etc.. hardware specs so we know what numbers to talk about so some calculations could be made. I'm not sure if these things are preferred to be kept quiet.

All in all I guess we just test how your code runs and scrutinize it during your development and go from there. As Vexed was saying.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: About lobby

Post by cybersphinx »

Tzeentch wrote:ddos open source seems low to me, hard to understand the intention.
People cheat and ddos in huge games like League of Legends, or fake their high scores in indie games (saw a few scores that were the maximum a signed 32 bit number can hold recently somewhere) - if it is public, someone with too much time and little maturity will mess with it.
We want information... information... information.
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

Image
Image
players who are in lobby are marked with green borders, others have red. I'm going to add a whisper function so you can send even players who are currently
ingame a message while you are in lobby.
the status shown by the game tab seems pretty useless, this can be replaced with rank requirements.
Maybe a switch tab between lobby <-> current game would be good. What do you think about it vexed? In this case you don't have to close current game to view
the lobby, what a lot of people are doing if there isn't anyone joining anymore.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: About lobby

Post by vexed »

Are you saying to have persistent connections with the server, so, people can talk to other people that are already in a game?
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

That's the idea.
The connection is established after connecting to the lobby and it gets interrupted as soon as the player closes the client or any network errors occurs.
(Maybe I should an an check if the player isn't completely afk for the next hours, with input detections..)

I guess after an optimation of the packets the server can handle this easily through ignoring inactive players and only sending them direct messages from other
players.
...
There might be a problem in the netplay structure because currently I'm not filling it with null bytes, when rejoining it.
Perhaps I'm going to change this, so that the players only get the game list when joining and when refreshing.
If so, the server won't send any remove and add game packet immediately after the creation to each player.
User avatar
Tzeentch
Trained
Trained
Posts: 313
Joined: 14 Oct 2012, 14:24

Re: About lobby

Post by Tzeentch »

Does the server re-use socket connections? Quite expensive to initialize a socket from the socket table for the kernel. I think in linux this is done using net.ipv4.tcp_tw_reuse=1, could perhaps do net.ipv4.tcp_tw_recycle = 1.

Whens the test patch out to experiment with?
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

Maybe I'm going to add an socket set, I'll have a look at this later.

I'm not sure what patch you are asking for. I added the client commits some days ago and I'll update them soon, since I changed quite a few things lately.
Problem is my internet connection, it's very slow and I'm still using 3.1.2 source, because the master source will change anyways, so the only important thing are
the code excerpts.
Also could upload a prebuilt executable, but the dlls aren't bound at this one.
User avatar
Tzeentch
Trained
Trained
Posts: 313
Joined: 14 Oct 2012, 14:24

Re: About lobby

Post by Tzeentch »

socket set? like this - http://linux.die.net/man/7/socket.

I was just referring to the client side changes. I'll give it a bit longer till it has been finalised more. As long as I can get it set up and run it easily I'm happy. Anything you can do about network speed? maybe disable interleaving.
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

I've added an option for reusing socket addresses, but where do you expect interleaving?
User avatar
Tzeentch
Trained
Trained
Posts: 313
Joined: 14 Oct 2012, 14:24

Re: About lobby

Post by Tzeentch »

great thanks, and I was just on about your local network for that last part :) I had it done at my ISP. I could've been a little more clear
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: About lobby

Post by vexed »

wz2101 wrote: Problem is my internet connection, it's very slow and I'm still using 3.1.2 source, because the master source will change anyways, so the only important thing are
the code excerpts.
Also could upload a prebuilt executable, but the dlls aren't bound at this one.
Erm, no, this is going about it the wrong way.
3.1 is feature locked, only bug fixes are supposed to be applied to that branch.

Looking at your code, the lack of documentation makes it much more difficult to see where are you going, and how the code is meant to work as opposed to how it currently works.
The coding semantics you are using is in bad practice, the use of goto's for loop control is frowned upon, and should only be used on extreme error conditions, and other issues as well. (This isn't assembly where we have a multitude of jne & jeq and so on flow control calls...)
The commit messages are... lacking.

By not having these patches in your own WZ repo, it makes it much more difficult to see what is being changed. See viewtopic.php?f=32&t=11570 for info about that.
Don't take this the wrong way, it isn't meant for you to feel disparaged, and I understand this is your first attempt, and I am sure you will get better in no time, I am just trying to nudge you in the correct direction on your programming endeavors. :)
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

I've actually changed what you mentioned some time ago, just not sure when I'm going to upload it, since I could have missed some leaks in the code.
Most things like the goto was just for the template, which was used to make sure that it's going to work in the end.
I'll upload the current project later.

Things I've changed are: Outqueue for packets, client won't miss packets, at least for me. (Currently one thread for receiving data, one for processing..
couldn't recv more than 1460 bytes at once, btw, but that's another topic)
Also added comments. Version seemed useless for me to send with the game packet, only one who should know about it is the server and
it can either list all games or version specific games by request.

Goto horrible or not, this is an case of view. My models were reserve engineering people, I guess they know what they do,
otherwise I wouldn't know like about 20 bugs in the game, with which I even can crash someone. But if you work after manuals, you are probably right.

Would be great if someone out there want to make the lobby and client code ready for use after I'm finished. With my knowledge I'll surely miss some
important things, but I'm also testing around with the main user interface because for me it seems to have no special theme design.
This is just for fun probably.

edit: some random picture
Image
that's some basic edit, but imo the user interface would be an easy thing to enhance (I'm not an designer)
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: About lobby

Post by Berg »

What is you monitor resolution?
That screenshot you posted is huge will the menu scale down with smaller monitors?
wz2101
Greenhorn
Posts: 13
Joined: 15 Jul 2014, 00:54

Re: About lobby

Post by wz2101 »

I'm afraid not.
Would need to scale the game and chat screen width down, otherwise you can't see the whole playerlist form.
Besides that I didn't even add the private message and invite form/icons.
Another option is to scale everything, yes.
As for now the whole background picture is getting scaled with the change of the resolution.
I'm not sure about opengl but if the backdrop is being scaled, then this would need an blur shader if there are detailed pictures in the bg.
Current backdrops seems really random, though. Only black-blue bg's would fit.

Is there anyone skilled in opengl? Shaders would be very nice, e.g. glow and blur shaders.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: About lobby

Post by stiv »

couldn't recv more than 1460 bytes at once
A network interface has a setting called Maximum Transmission Unit (MTU). This is the size of the largest packet you can get. 1500 is a common value. Part of the fun of stream sockets is you may not get all the data you were hoping for at once.
Goto horrible or not,
One of the principles of building maintainable software is "Don't do weird stuff". Using goto for loop control is weird. We are not writing assembly code where all you can do is test and branch.

One place you will see goto used is to create a sort of do-it-yourself exception handling in languages (like C) that don't provide it. The basic idea is rather than have multiple error exits from a block of code, you jump via goto to a single error handling block at the end.
Post Reply