Ticket #155 (new feature)

Opened 15 months ago

Last modified 3 months ago

ladder integration

Reported by: MelTraX Owned by: -
Priority: major Milestone: 0.2 improved functionality
Component: user interface Version:
Keywords: Cc: vladmihaisima@…

Description

I wrote an API now that should give you everything you need to integrate my new ladder system into SpringLobby?:

https://meltrax.homeip.net/projects/other/spring/ladder/lobby/

Attachments

0001-Initial-support-for-ladder.-Can-host-games-would-up.patch (9.3 kB) - added by Malric <vladmihaisima@…> 5 months ago.
First patch
0002-The-rest-of-the-files-not-commited-last-commit.patch (11.7 kB) - added by Malric <vladmihaisima@…> 5 months ago.
Second patch (should have in the same as the first)
0001-Made-the-connect-dialog-aware-of-branches.patch (17.2 kB) - added by Malric <vladmihaisima@…> 5 months ago.
Patch to baindamage ladder branch, that make the connection dialog aware of ladders.

Change History

Changed 12 months ago by MelTraX

The URL still works but the real ladder now uses the old domain and therefore the API is at:

http://www.spring-league.com/ladder/lobby/

Changed 5 months ago by Malric <vladmihaisima@…>

First patch

Changed 5 months ago by Malric <vladmihaisima@…>

Second patch (should have in the same as the first)

Changed 5 months ago by Malric <vladmihaisima@…>

This is an initial patch. I plan to finish it, but I am going to vacation, so it is good to be publicly available, so that I get some feedback. If one of the dev could skim it and tell me if there are better ways to do what I do please tell me. I choosed libcurl as I didn't find any reference that wx supports https and the ladder uses https.

Most of the points that are questionable have a TODO in comment.

The patch contains initial support for ladder systems. First what works:

  • Getting ladder list from server and the max player 'rule'.
  • Setting in the host dialog the correct battle description, max number of players and password.
  • Sending the results back (if the password wouldn't be hashed - this is set in ladder.cpp line 200)

What doesn't work (and should be fixed):

  • -lcurl is not added by default to the link command. I hacked the makefile and added LIBCURL=-lcurl after the autogen etc.
  • The password is hashed, so a different password should be set in the settings. For test I used my password hardcoded in ladder.cpp
  • All the rules of the ladder have to be imposed (min players, max players, mod, map, resources, etc)
  • Error reporting
  • Load information about players

Please tell me if you prefer other formatting, conventions etc. I tried to follow what I have seen but it is not that regular :). I will be able to reply for sure after 20 july (possible also in the meantime).

Changed 5 months ago by BrainDamage

i wrote a short page about preferred coding style for the project, i did some fixes to your code, simplified it a lot in the parsing part and changed many parts to use wxArrayString and wxString so it becomes unicode aware and it's 3 times more readble and easier to expand.

you can check it in the ladder branch of my repository

Changed 5 months ago by BrainDamage

forgot the link to the page: http://trac.springlobby.info/wiki/CodingStyle

Changed 5 months ago by Malric <vladmihaisima@…>

  • cc vladmihaisima@… added

As promised, the work continued: the 0001-Made-the-connect-dialog-aware-of-branches.patch patch make the connect dialog aware of ladder. It does not yet verify the password or ladder host.

Also a new tab "register ladder" should be done.

PS: Maybe you can put this bug next to "ladder API" in page http://trac.springlobby.info/wiki/Hack

Changed 5 months ago by Malric <vladmihaisima@…>

Patch to baindamage ladder branch, that make the connection dialog aware of ladders.

Changed 5 months ago by Malric <vladmihaisima@…>

Please delay the integration of the patch, I will make a public git repo tonight...

Changed 5 months ago by Malric <vladmihaisima@…>

Repo for my work:

git clone git://66.36.240.138/springlobby.git

Changed 3 months ago by Malric <vladmihaisima@…>

The remote branch on which the work should be is : ladder_support.

If you do not see any difference please tell me...

Add/Change #155 (ladder integration)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.