Page 1 of 2

ChiliLobby - WIP

Posted: 21 Apr 2014, 18:02
by gajop
This is the WIP update thread of an in-game lobby I'm making, called ChiliLobby. Feel free to ask questions and offer suggestions here, but keep it on topic.

Regarding Spring, the lobby in question uses Lua sockets and a modified chili.
The chili modifications are project agnostic and will probably be integrated upstream in current or similar form.

All projects also require LCS, which provides a class-based system in Lua (the official repo can also be used instead).

The lobby itself consists of the following repositories:
  • liblobby (in-game lobby library, can be used standalone without chili) docs
  • chililobby (chili lobby, requires liblobby and chiliui)
  • IngameLobby (standalone Spring mod, which uses the other two repos and provides a complete example)
LibLobby Version: 0.2
LibLobby Status: alpha

ChiliLobby Version: Unreleased
ChiliLobby Status: WIP, pre-alpha

Re: ChiliLobby - WIP

Posted: 21 Apr 2014, 18:10
by gajop

Re: ChiliLobby - WIP

Posted: 21 Apr 2014, 18:22
by gajop
Week 2: Not much new stuff visible, mostly just sorting out repos and dealing with chili (added editbox.hint among other changes).

Re: ChiliLobby - WIP

Posted: 21 Apr 2014, 20:04
by jK
:mrgreen:

Re: ChiliLobby - WIP

Posted: 02 May 2014, 10:13
by abma
@gajop:

Code: Select all

2014-05-02T07:08:28 ------------------------------------------------------------
2014-05-02T07:08:28 Traceback (most recent call last):
2014-05-02T07:08:28   File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2014-05-02T07:08:28     self.socketmap[s].Handle(data)
2014-05-02T07:08:28   File "/home/lobby/uberserver/Client.py", line 144, in Handle
2014-05-02T07:08:28     self._protocol._handle(self,cmd)
2014-05-02T07:08:28   File "/home/lobby/uberserver/protocol/Protocol.py", line 282, in _handle
2014-05-02T07:08:28     function(*([client]+arguments))
2014-05-02T07:08:28   File "/home/lobby/uberserver/protocol/Protocol.py", line 730, in in_LOGIN
2014-05-02T07:08:28     m = md5(password)
2014-05-02T07:08:28 UnicodeEncodeError: 'ascii' codec can't encode character u'\u0137' in position 7: ordinal not in range(128)
hope this helps... seems sth. in "LOGIN" is binary/invalid utf-8/non-ascii.

Re: ChiliLobby - WIP

Posted: 02 May 2014, 11:10
by dansan
In case it's the password: it must be encoded in base64 of binary MD5 (128 bit / 16 byte). Python-code to check if your lua works:

Code: Select all

import base64, hashlib
base64.b64encode(hashlib.md5("s3cr3t").digest())
'pNgOrJqyakotoEElvCwJag=='

Re: ChiliLobby - WIP

Posted: 02 May 2014, 11:32
by abma

Re: ChiliLobby - WIP

Posted: 02 May 2014, 11:50
by dansan
Ah OK - thanks.
... so to make this work, the lualobby password widget must be able to consume (and forward) a utf-8 string, in case someone used such when registering through springlobby/weblobby?

Re: ChiliLobby - WIP

Posted: 02 May 2014, 14:59
by gajop
abma wrote:@gajop:

Code: Select all

2014-05-02T07:08:28 ------------------------------------------------------------
2014-05-02T07:08:28 Traceback (most recent call last):
2014-05-02T07:08:28   File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2014-05-02T07:08:28     self.socketmap[s].Handle(data)
2014-05-02T07:08:28   File "/home/lobby/uberserver/Client.py", line 144, in Handle
2014-05-02T07:08:28     self._protocol._handle(self,cmd)
2014-05-02T07:08:28   File "/home/lobby/uberserver/protocol/Protocol.py", line 282, in _handle
2014-05-02T07:08:28     function(*([client]+arguments))
2014-05-02T07:08:28   File "/home/lobby/uberserver/protocol/Protocol.py", line 730, in in_LOGIN
2014-05-02T07:08:28     m = md5(password)
2014-05-02T07:08:28 UnicodeEncodeError: 'ascii' codec can't encode character u'\u0137' in position 7: ordinal not in range(128)
hope this helps... seems sth. in "LOGIN" is binary/invalid utf-8/non-ascii.
Thanks, Unicode is not supported yet, as it doesn't really work with the usual widget handlers. I'm also wotking directly with lobby.springrts.com so you may be seeing more errors there than usual

Re: ChiliLobby - WIP

Posted: 02 May 2014, 15:01
by gajop
dansan wrote:Ah OK - thanks.
... so to make this work, the lualobby password widget must be able to consume (and forward) a utf-8 string, in case someone used such when registering through springlobby/weblobby?
Yes, but pws with whitespace won't work though. In general unicode shouldn't be a problem when I update the widgethandler.

Re: ChiliLobby - WIP

Posted: 03 May 2014, 02:36
by Forboding Angel
I can haz week 3 update? :-D

Re: ChiliLobby - WIP

Posted: 03 May 2014, 15:14
by gajop
Forboding Angel wrote:I can haz week 3 update? :-D
Nothing happened last week, so I'm not counting it.
Wait tomorrow for this week's update :p

Re: ChiliLobby - WIP

Posted: 04 May 2014, 21:24
by gajop
Week 3: Implemented the server messages, that was a lot of work..
Also added (GUI): login error messages, TOS agreement accepting, user/battle count & ping, battle list
Video here: https://www.youtube.com/watch?v=lb-sAtbrLlM

PS: Can anyone suggest some background music? I just chose something random youtube already has. (also seems to be an issue with the predefined videos, as if they're being "processed forever" when i put some background music..)

Re: ChiliLobby - WIP

Posted: 11 May 2014, 16:47
by gajop
Week 4: Implemented all of the client commands as well.

Added the docs: http://gajop.github.io/liblobby/ . Using Sphinx for this, thoughts?
Imo, it looks nice and I like how I can link to functions with very little work from my side: http://gajop.github.io/liblobby/interfa ... rface.Ping

PS: Pretty much no work on the GUI (chililobby)

Re: ChiliLobby - WIP

Posted: 11 May 2014, 23:23
by Funkencool
Awesome stuff Gajop :-)

I had messed with my own lua lobby but never got very far with it. I'm glad now because this code is all much better than anything I would have came up with. I think I'm most impressed with your nicely organized documentation (same goes for chili, thanks!).

For Engine Devs:
With the advent of this maybe it would be best to allow socket connections to springrts.com:8200 by default?

Re: ChiliLobby - WIP

Posted: 11 May 2014, 23:25
by FLOZi
Funkencool wrote:
For Engine Devs:
With the advent of this maybe it would be best to allow socket connections to springrts.com:8200 by default?
https://github.com/spring/spring/commit ... 4025853d37

Re: ChiliLobby - WIP

Posted: 11 May 2014, 23:27
by gajop
FLOZi wrote:
Funkencool wrote:
For Engine Devs:
With the advent of this maybe it would be best to allow socket connections to springrts.com:8200 by default?
https://github.com/spring/spring/commit ... 4025853d37
Didn't know this, cool!
Still doesn't work if one tries to connect to springrts.com directly (instead of lobby.springrts.com), or has localhost available as well. But anyways, I'll amend my code and docs to reflect this, thanks!

Re: ChiliLobby - WIP

Posted: 12 Sep 2014, 01:42
by Forboding Angel
Progress?

Re: ChiliLobby - WIP

Posted: 12 Sep 2014, 09:11
by gajop
None, focused on scenario editor in the last few months.

Re: ChiliLobby - WIP

Posted: 01 Oct 2014, 01:34
by gajop
Update video: https://www.youtube.com/watch?v=C67RwpT_FwY

ChiliLobby:
- can now join battle rooms and start games
- can now see which games/maps are present
- allow private chat and irc emotes
- added user list in chat and battle rooms
- removed minimap, tooltip and resource bar
- fixes

LibLobby:
- now tracking channel information and additional in the Wrapper
- fixed bugs

PS: Current lobby needs dev engine version! Don't bother trying without one.