AlphaLobby Alpha 0.06.10 - Page 2

AlphaLobby Alpha 0.06.10

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby RC1

Post by Cheesecan »

Oh progress has almost stopped now that I started school again and also discovered minecraft. :-) Winter and darkness makes me damn lazy.

Your lobby has a clear niche, it's very lightweight but still functional, half as big as my unfinished compiled source(not counting icons). I don't know if anyone is going to take a considerable amount of users from tasclient or springlobby because they are so well established now. Others tried before and failed. Springlobby has some really nasty bugs but once those are fixed people won't look for another linux lobby. So I'm not really in a hurry, I just develop for fun and for my own use. I think there might be a bigger demand for a really good singleplayer client. One that has all the things you would expect from a "real" game.

Yeah you do save a lot of time developing in a more abstract language. C++ I can understand using but just C must be a real trip. I'm guessing if you don't use C++ or boost libs then you are even writing your own data structures. All that extra work, I just go into maven and tell maven to download me a config file reader library or a GUI theme library and add a few lines of code to initialize them etc and that's about it. Also developing for win32 api seems like more than a gamble than java even over all platforms. Win32 is so dodgy that something might work on XP but fail on Vista and half-work on Windows 7. With Java it's always running on the same virtual machine so there's no difference at all inside the sandbox. The only differences appear in file system I/O and that sort of thing. Happened to me when I was reading from a buffer and discovered that what I was reading was little endian while the java buffer class was big endian..all it took to fix was a single method call on that object.

I don't agree that the lobby protocol is so bad it needs to be scrapped though, but maybe from a lower level perspective you see more inefficiencies in it. The protocol pdf I generated from the xml is 32 pages long, which seems a bit extreme for what is still a pretty trivial application. Maybe using CORBA would have been more elegant.

I have an auto-unspec feature too, SL and tasclient aren't really very innovative so I doubt that much of the community will catch on to wanting that feature too. :mrgreen:
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: AlphaLobby RC1

Post by Satirik »

i like the battle tab layout changing with different window size
Axiomatic
Posts: 68
Joined: 20 Jan 2011, 04:17

Re: AlphaLobby RC1

Post by Axiomatic »

Satirik wrote:works here, column headers are not visible in player list so you can't sort it, is it intended ? and you can't host without relayhost ?
Not showing column headers was intentional. I'm trying to keep the interface as clean as possible. It should sort names alphabetically after it groups by teams. I just changed the underlying structure from a linked list to a flat array; I forgot to fix sorting.

No you can't host without relayhost. I shouldn't have called this RC1 because it has so many features missing.
Axiomatic
Posts: 68
Joined: 20 Jan 2011, 04:17

Re: AlphaLobby RC1

Post by Axiomatic »

Cheesecan wrote: Yeah you do save a lot of time developing in a more abstract language. C++ I can understand using but just C must be a real trip. I'm guessing if you don't use C++ or boost libs then you are even writing your own data structures.
Using C isn't quite so bad as you might think, you get used to stuff like "for (s=head; s->next; s=s->next);" instead of "list.tail()".
I implemented my own hash function and md5 generator, but I could have just used a library for that. If I were being paid to do this I wouldn't have wasted my time, but thats not really the point.
Cheesecan wrote:Win32 is so dodgy that something might work on XP but fail on Vista and half-work on Windows 7.
Win32 has some obsession with compatibility, to the extent that some win95 applications actually work in windows 7. Clearly I have had some problems, but there is every chance it has nothing to do with the api, rather I'm doing something illegal like overrunning a buffer.
Too much compatibility is win32's biggest problem imo. Bitmaps still support multiple pixel formats for example. Its 2011 and everyone uses 32bit RGBA.
Cheesecan wrote: I don't agree that the lobby protocol is so bad it needs to be scrapped though, but maybe from a lower level perspective you see more inefficiencies in it.
I have no idea why a network protocol would translate any binary data into strings. It would use half as much bandwidth if it didn't do that.
Client status would only be 9 bytes (1 byte to enumerate command, 4 byte user ID, 4 byte status). Instead of the 30 bytes or so it currently is.
Cheesecan wrote: I have an auto-unspec feature too, SL and tasclient aren't really very innovative so I doubt that much of the community will catch on to wanting that feature too.
Auto unspec is easy enough to implement, the only 'trick' is to not update so frequently that the autohosts kick you. Its hard enough to get into games as it is without having 30 specs automatically unspecing, a lot of them would just end up afk too. Thats why I removed the auto-unspec.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby RC1

Post by Cheesecan »

list.tail()? That's an old way to do it. After that came iterators. But Java has for each loops since 1.4 that make iterators seem like old shit.
for(Dog Fido : Dogs) {
...
}
now that's how you roll through a collection in style. :)

The reason why the lobby protocol is inefficient is because TasServer is written in Java and betalord made it easy for himself by comparing strings instead of bits & bytes in most places(cept for status basically). If we improve it, every lobby needs to be updated. :( So it's probably not gonna happen.

Yes I have a timer on auto-unspec to avoid getting kicked for spamming the lobby too fast. It isn't unfair imho, just saves people the trouble of spamming themselves. Ideally the battle bots should let the player who joined first unspec first. That is up to bot makers to implement.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: AlphaLobby RC1

Post by hoijui »

i guess you mean autohost devs (not bot makers).

the official lobby server is running on aegis's python server since about half a year or so already. while TASServer has changed a lot internally since 0.35 (Betalords last release a few years ago), there is little direct benefit yet, except much less memory use if there are lots of usually inactive accounts, like on the official server. aegis server never had that problem.

Optimizing the lobby protocol for byte size makes no sense, as we never had a problem with bandwidth (say, 5 years ago, where we probably had similar traffic).

We should probably have a mailing-list or something with the same possibilities, but more modern, where all lobby-protocol dependent devs would subscribe. (i will not do it)
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: AlphaLobby RC1

Post by Satirik »

Axiomatic wrote:Auto unspec is easy enough to implement, the only 'trick' is to not update so frequently that the autohosts kick you. Its hard enough to get into games as it is without having 30 specs automatically unspecing, a lot of them would just end up afk too. Thats why I removed the auto-unspec.
and ... a timer to auto unspec ? wtf, you don't check if there is an open slot before unspecing you just spam unspec ?
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby RC1

Post by Cheesecan »

hoijui wrote:i guess you mean autohost devs (not bot makers).

the official lobby server is running on aegis's python server since about half a year or so already. while TASServer has changed a lot internally since 0.35 (Betalords last release a few years ago), there is little direct benefit yet, except much less memory use if there are lots of usually inactive accounts, like on the official server. aegis server never had that problem.
Why run the server on Python? Java would be faster in theory:
http://www.osnews.com/story/5602/Nine_L ... I_O/page3/
hoijui wrote: Optimizing the lobby protocol for byte size makes no sense, as we never had a problem with bandwidth (say, 5 years ago, where we probably had similar traffic).
Makes no sense? Optimization always makes some sense at least.

http://springrts.com/phpbb/viewtopic.ph ... te#p463819
Considering that we are operating on donations, I would say that reducing bandwidth consumption is a healthy pursuit..
Satirik wrote:
Axiomatic wrote:Auto unspec is easy enough to implement, the only 'trick' is to not update so frequently that the autohosts kick you. Its hard enough to get into games as it is without having 30 specs automatically unspecing, a lot of them would just end up afk too. Thats why I removed the auto-unspec.
and ... a timer to auto unspec ? wtf, you don't check if there is an open slot before unspecing you just spam unspec ?
I think we can assume he left that unmentioned as it is fairly obvious to anyone. His point is that if 10 people are running a lobby that can auto-unspec, 9 people will fail to unspec.
Axiomatic
Posts: 68
Joined: 20 Jan 2011, 04:17

Re: AlphaLobby RC1

Post by Axiomatic »

hoijui wrote:Optimizing the lobby protocol for byte size makes no sense, as we never had a problem with bandwidth
It would make logging in half a second faster xD. I suppose it's not really worth the hassle to change at this point, but it could have been designed better in the first place.
Satirik wrote: and ... a timer to auto unspec ? wtf, you don't check if there is an open slot before unspecing you just spam unspec ?
You can't tell if there is actually an open slot, since autohosts won't really report the number of players. And if you just unspec whenever someone leaves/specs, you end up getting kicked occasionally. At any rate, its trivial to implement; I just don't want people to have that feature.
Cheesecan wrote: list.tail()? That's an old way to do it... <snip>
list.tail() is how you would get to the end of a list. My point is that lower level code isn't so hard to understand when you are used to it. A decent C programmer would recognize a singly-linked list immediately. When you compare the actual amount of code required to iterate over a c++ vector, compared to an array, c++ doesn't save any typing. I haven't used much java, but I understand that its a lot less verbose than c++. And if I wasn't worried about performance, I'd rather use Haskell than any of them.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AlphaLobby Alpha 0.1

Post by knorke »

super nice!
quickly tested on 32bit win xp and worked without problems.
I really like you concentrate on the responsive/no hanging up thing. TASClient, ZKL and SL often made me rage with their preloading, loading, caching, "trolol import settings?" and whatnot.
While all I wanted was was to test my mod with a bit more options than running spring.exe directly offers.
Dont know if/where you save settings but would be cool to have it in a file next to the .exe and if you delete that file the settings are just reset, no questions asked, no guessing if it loads from registry, my documents etc.
Also would be nice if it worked from its own folder instead of having to be placed in games\spring\
Something like games\spring\alphalobby\
I know right now it is just one .exe file but maybe you add more (chatlogs, settings etc) and the springfolder is already a mess because other lobby dont go in their own folder either... (hurrdurr, must find unitsync.dll but it must be possible somehow)

blablabla if there was support for bots and chose startpos before game (like in springlobby) I would already use it right now.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby RC1

Post by Cheesecan »

Axiomatic wrote:
Cheesecan wrote: list.tail()? That's an old way to do it... <snip>
list.tail() is how you would get to the end of a list. My point is that lower level code isn't so hard to understand when you are used to it. A decent C programmer would recognize a singly-linked list immediately. When you compare the actual amount of code required to iterate over a c++ vector, compared to an array, c++ doesn't save any typing. I haven't used much java, but I understand that its a lot less verbose than c++. And if I wasn't worried about performance, I'd rather use Haskell than any of them.
I do know what it is.. Just saying that even something like iterating over a list has become a lot more compact code-wise since C, C++ introduced iterators and in Java there is the Collections framework which allows you to iterate over all kinds of data structures using the for(each) keyword which results in much cleaner code.

Btw in tests C++ has the same performance as C and the STL implementation of a singly-linked list is probably faster than the one you could write(it has been optimized by a bunch of people).

You can tell if a player slot is free by maintaining the state based on joins, leaves and status changes. It usually matches what the autohost thinks unless there is some delay in messages. You won't get kicked as long as you don't send unspec status update too fast.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: AlphaLobby Alpha 0.1

Post by Satirik »

Cheesecan wrote:I think we can assume he left that unmentioned as it is fairly obvious to anyone. His point is that if 10 people are running a lobby that can auto-unspec, 9 people will fail to unspec.
9people will send an unspec command, ie 1command per player, why would you get kicked for that ? you obviously didn't understand what he meant (which is btw wrong)
Axiomatic wrote:You can't tell if there is actually an open slot, since autohosts won't really report the number of players. And if you just unspec whenever someone leaves/specs, you end up getting kicked occasionally. At any rate, its trivial to implement; I just don't want people to have that feature.
this is wrong, you won't get kicked for unspecing everytime someone leaves, when i try to manually unspec, i spam unspec twice a second for several minutes and i never got kicked for that, autohosts won't kick you, and server only kicks you if you spam at >1ko/s or spam clientstatus (not battle client status)
Axiomatic
Posts: 68
Joined: 20 Jan 2011, 04:17

Re: AlphaLobby Alpha 0.1

Post by Axiomatic »

knorke wrote: Dont know if/where you save settings but would be cool to have it in a file next to the .exe
Right now it already does that. It is saved as alphalobby.conf. Personally I hate how applications put all their settings in the registry, I like it when I can easily revert everything to default, and nothing is left after an uninstall.
knorke wrote: I know right now it is just one .exe file but maybe you add more (chatlogs, settings etc) and the springfolder is already a mess because other lobby dont go in their own folder either... (hurrdurr, must find unitsync.dll but it must be possible somehow)
blablabla if there was support for bots and chose startpos before game (like in springlobby) I would already use it right now.
These are all on the to do list. I'll get around to them when I fix the crash ppl are having (at least 2 ppl can't start it and its only been downloaded 7 times).

Btw in tests C++ has the same performance as C and the STL implementation of a singly-linked list is probably faster than the one you could write(it has been optimized by a bunch of people).
I'm sure that the STL is optimized far better than I ever could. I use C because I enjoy it more. I feel like I'm interacting with the hardware rather than a library. As for being c++ implementations being faster; they are most likely optimized for large inputs. It is possible that a simpler implementation will be faster for small inputs.

btw, I think that c++0x includes for each loops.
And I suppose you could abuse the preprocessor to get one in c
"#define FOR_EACH(_s, _L) (typeof(*_L) *_s = _L; _s - _L < LENGTH_OF(_L); ++_s)"
though it would only work on arrays. And I gcc won't optimize pointer arithmetic as well as iterating with an index.
Last edited by Axiomatic on 21 Jan 2011, 02:29, edited 1 time in total.
Axiomatic
Posts: 68
Joined: 20 Jan 2011, 04:17

Re: AlphaLobby Alpha 0.1

Post by Axiomatic »

Satirik wrote: this is wrong, you won't get kicked for unspecing everytime someone leaves, when i try to manually unspec, i spam unspec twice a second for several minutes and i never got kicked for that, autohosts won't kick you, and server only kicks you if you spam at >1ko/s or spam clientstatus (not battle client status)
Maybe my implementation had a bug or something, idk. To be honest, too much is being made of an off-the-cuff remark. All that I meant was it was trivial to implement.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: AlphaLobby RC1

Post by aegis »

Cheesecan wrote:Why run the server on Python?
speed is not the only factor (however, uberserver easily surpassed tasserver in terms of number of accounts able to stay connected and be serviced when it was first released, though hoijui and tobi did improve it a bit since then - yes this is definitely due to implementation on both ends, but my implementation was directly related to using python)
python mostly gives me ease of development and ease of deployment (90% of my patches are applied without restarting the server)
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby Alpha 0.1

Post by Cheesecan »

Seems your thread has been hijacked for use as an e-peen contest between lobby devs. :wink:
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: AlphaLobby Alpha 0.1

Post by MidKnight »

Cheesecan wrote:Seems your thread has been hijacked for use as an e-peen contest between lobby devs. :wink:
You mean that's not what it's always been? ZING!
Also, you instigated it. :P
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: AlphaLobby Alpha 0.1

Post by Cheesecan »

MidKnight wrote:
Cheesecan wrote:Seems your thread has been hijacked for use as an e-peen contest between lobby devs. :wink:
You mean that's not what it's always been? ZING!
Also, you instigated it. :P
No Satirik did..
Pako
Posts: 174
Joined: 12 Jul 2009, 18:57

Re: AlphaLobby RC1

Post by Pako »

Cheesecan wrote: All lobbies I can think of:
tasclient, springlobby, aflobby, qtlobby, zero-k, cheeselobby, alphalobby..
yup we got lobbies like a ho has STDs. Typical disease of opensource is redundancy.. :mrgreen:
You forgot sefi-lobby and the ingame lobby.

Don't mess with the CPU field, it's the best smurf detector. Like 1.8 GHz from Poland is wombat or bomba whether he says something retarded in 10 seconds or even more retarded later.
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: AlphaLobby Alpha 0.1

Post by Wombat »

bombas cpu is not 1.8... i feel offended u dont know who pwns u >>
Post Reply

Return to “Lobby Clients & Server”