Mod/map downloader and lobby integration

Mod/map downloader and lobby integration

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Mod/map downloader and lobby integration

Post by Licho »

As you know I added p2p downloading and basic management system for maps and mods to CaDownloader viewtopic.php?f=1&t=13990
http://www.caspring.org/wiki/DownloaderProtocol

I would like this to be integrated with lobby. Say I click on game and I dont have correct mod -> lobby notifies or starts this downloader and waits for result while displaying progress.

Or better yet allows you to join and shows status as desynced but requests mod/map download and after download is finished reloads maps and mods.

i can provide services such as:
- starting download of resource identified by unitsync hash
- tracking download progress and notifying about errors/completion
- lookup queries (searching by file name, hash and later by metadata)

If you want your lobby to integrate with this tool its up to you to tell me what you need and suggest communication means.
Last edited by Licho on 25 Feb 2008, 15:29, edited 1 time in total.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Mod/map downloader and lobby integration

Post by BrainDamage »

i think the simplest, most cross-platform way is to have the downloader have a tcp socket to let the lobbies control it

i think the protocol can be quite simple:
lobby itself that pass the paths where to store the maps/mods
the lobby queries the system for an hashcode
the downloader returns infos about the transfer, like progress, seeders, leechers, ecc
the downloader triggers a signal to the lobby when the download is complete so the lobby can refresh the map/mod list

a plain text protocol would work perfectly due to it's simplicity and the implementation doesn't requires a flexible syntax

EDIT: also, every file should have an arbitrary list of dependency hashes, so eg, a BA mutator depends on BA, which depends on OTA material, ecc; qhen the lobby queries for the BA mutator, the downloader will turn infos about all the necessary files and their download progress
Last edited by BrainDamage on 17 Feb 2008, 17:04, edited 1 time in total.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Mod/map downloader and lobby integration

Post by LordMatt »

Can you make this not auto-download CA?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Mod/map downloader and lobby integration

Post by Satirik »

the gui should be provided by the lobby i think a dll would be the best with some api to ask it to download, to make the torrents, allow upload, get the current download progress etc

edit : you could also add api to download and zip mods like for CA or just modify the download one to check if it has to download the whole mod or just the latest updates with an online db for each mod that need this system
Last edited by Satirik on 17 Feb 2008, 17:11, edited 2 times in total.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

LordMatt wrote:Can you make this not auto-download CA?
Its not autodownloading CA lol :)
Unless you check box to auto get CA..
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Mod/map downloader and lobby integration

Post by Satirik »

Licho wrote:
LordMatt wrote:Can you make this not auto-download CA?
Its not autodownloading CA lol :)
Unless you check box to auto get CA..
actually it does
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

Brain damage:
- there is no need to specify path for maps/mods because cadownloader knows where spring is and is using unitsync and auto-monitoring maps folder for any changes

- with TCP you have problem of who specifies port.. but I guess lobby could specify its listen port on commandline.
it would run downloader.exe -myport 1234 -gethash -2132132,123123,-34234

- regarding dependencies - I would like to keep it away from downloader system for now to keep it simple. Lobby client knows dependencies anyway and can request all files

Satirik:
- regarding gui - yes lobby should provide gui but I would like to keep existing gui too. That basically means downloader can report you progress and status and torrent info and you can provide any gui you like but if users clicks sys tray icon he would see similar info.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

Satirik wrote:
Licho wrote:
LordMatt wrote:Can you make this not auto-download CA?
Its not autodownloading CA lol :)
Unless you check box to auto get CA..
actually it does
You mean it gets CA even if its unchecked?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Mod/map downloader and lobby integration

Post by KDR_11k »

Make it run low-bandwidth please, last time I tried to use it I timed out a lot.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

There was a bug in upload bandwidth limiting. It should be fixed now.
Or you mean you want to limit download too?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Mod/map downloader and lobby integration

Post by Satirik »

Licho wrote:You mean it gets CA even if its unchecked?
yes
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Mod/map downloader and lobby integration

Post by BrainDamage »

Licho wrote:Brain damage:
- there is no need to specify path for maps/mods because cadownloader knows where spring is and is using unitsync and auto-monitoring maps folder for any changes
how can it knows properly the spring/unitsync location in the various platforms? i'd like to know myself because atm we just try various paths to guess the location and ask the user to verify that manually
Licho wrote:- with TCP you have problem of who specifies port.. but I guess lobby could specify its listen port on commandline.
it would run downloader.exe -myport 1234 -gethash -2132132,123123,-34234
sounds good
Licho wrote:- regarding dependencies - I would like to keep it away from downloader system for now to keep it simple. Lobby client knows dependencies anyway and can request all files
no, the lobby doesn't know the dependency list, unitsync does, but the list is not exposed trough the dll interface
Licho wrote:- regarding gui - yes lobby should provide gui but I would like to keep existing gui too. That basically means downloader can report you progress and status and torrent info and you can provide any gui you like but if users clicks sys tray icon he would see similar info.
a no-gui version would still be nice since it would only add more dependencies in various OSs
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

gui should not be a problem because downloader needs mono on linux anyway. And if you have mono - gui works.

I dont like gui-less mode much, because that would mean that either:
a) you are only seeding while downloading
b) you have process which runs on background (downloader), seeding and you dont have any direct controls for it

Regarding unitsync - it checks registry and queries user when not sure.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Mod/map downloader and lobby integration

Post by BrainDamage »

Licho wrote:Regarding unitsync - it checks registry.
not cross platform at all, that's why the lobby should be able to pass the locations (spring, unitsync and data folders have 3 different places in OS different from windows)

the lobby already knows them, so it could just pass the infos
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Mod/map downloader and lobby integration

Post by Licho »

Satirik wrote:
Licho wrote:You mean it gets CA even if its unchecked?
yes
Ok whoops.. you were right.. it didnt save settings correctly and after restart it was getting it even when checkbox was off.
Fixed in 2.2.0.3
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Mod/map downloader and lobby integration

Post by Satirik »

Licho wrote:gui should not be a problem because downloader needs mono on linux anyway. And if you have mono - gui works.

I dont like gui-less mode much, because that would mean that either:
a) you are only seeding while downloading
b) you have process which runs on background (downloader), seeding and you dont have any direct controls for it

Regarding unitsync - it checks registry and queries user when not sure.
right :) or the lobby should make a complete gui to do that but i don't want to :)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Mod/map downloader and lobby integration

Post by AF »

I would like to use this but I would also like total control over the GUI, a GUI'less mode and a GUI mode would be needed for those of us who have differing opinions on how much effort should be put into creating custom GUIs..

Starting it as a second process and communicating via TCP would be nice, being able to using standard error in and out streams to do it as well as TCP would be very useful too, and in many cases easier to implement.

Also even if the lobby had access to dependencies, it would be incapable of knowing until the file had finished downloading, meaning that there is a bottleneck, whereas if it knew before hand then all necessary files could be requested and the download time would be both clearer to the end user and faster.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Mod/map downloader and lobby integration

Post by KDR_11k »

Licho wrote:There was a bug in upload bandwidth limiting. It should be fixed now.
Or you mean you want to limit download too?
No, it's jsut that running BT increases my timeouts. Probably because my father is also running a BT at max upload...
Jonanin
Posts: 107
Joined: 13 Jan 2008, 21:34

Re: Mod/map downloader and lobby integration

Post by Jonanin »

Is CADownloader cross platform?
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Mod/map downloader and lobby integration

Post by aegis »

hey, you can always just integrate the RSS feed and use a bittorrent library compatible with your lobby ^_^
Last edited by aegis on 18 Feb 2008, 03:36, edited 1 time in total.
Post Reply

Return to “Engine”