ChiliLobby - WIP

ChiliLobby - WIP

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

Moderators: Moderators, Lobby Developers, Moderators, Lobby Developers

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

ChiliLobby - WIP

Post 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
Last edited by gajop on 11 May 2014, 16:51, edited 1 time in total.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post by gajop »

0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post by gajop »

Week 2: Not much new stuff visible, mostly just sorting out repos and dealing with chili (added editbox.hint among other changes).
Attachments
chili_week_02.jpg
(460.94 KiB) Downloaded 4 times
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: ChiliLobby - WIP

Post by jK »

:mrgreen:
0 x

abma
Spring Developer
Posts: 3568
Joined: 01 Jun 2009, 00:08

Re: ChiliLobby - WIP

Post 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.
0 x

dansan
Server Owner & Developer
Posts: 1192
Joined: 29 May 2010, 23:40

Re: ChiliLobby - WIP

Post 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=='
0 x

abma
Spring Developer
Posts: 3568
Joined: 01 Jun 2009, 00:08

Re: ChiliLobby - WIP

Post by abma »

0 x

dansan
Server Owner & Developer
Posts: 1192
Joined: 29 May 2010, 23:40

Re: ChiliLobby - WIP

Post 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?
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14618
Joined: 17 Nov 2005, 02:43

Re: ChiliLobby - WIP

Post by Forboding Angel »

I can haz week 3 update? :-D
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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..)
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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)
0 x

User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: ChiliLobby - WIP

Post 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?
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6113
Joined: 29 Apr 2005, 01:14

Re: ChiliLobby - WIP

Post 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
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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!
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14618
Joined: 17 Nov 2005, 02:43

Re: ChiliLobby - WIP

Post by Forboding Angel »

Progress?
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post by gajop »

None, focused on scenario editor in the last few months.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: ChiliLobby - WIP

Post 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.
0 x

Post Reply

Return to “Lobby Clients & Server”