Author Topic: In-Game HTTP/FTP downloads  (Read 14460 times)

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« on: August 28, 2006, 01:18:37 am »
I've added cURL http://curl.haxx.se/ support into my backport builds:

http://trem.tjw.org/backport/

If you're using Linux you will need to have libcurl installed (I think most distros install it by default though).  The windows build is statically linked to libcurl, and Mac OS X comes with libcurl installed already.

In order for it to work, you need to enable downloads by setting the cl_allowDownload cvar to 1.  cURL downloading is enabled by default, but you can disable it by setting cl_wwwDownload to 0.

Server setup instructions:

1) You need to use the latest tremded from http://tjw.org/tremulous/
2) Enable server downloads in your server config:
   
Code: [Select]
set sv_allowDownload 1
3) Enable download redirection:
   
Code: [Select]
set sv_wwwDownload 1
4) Set the base URL for your downloads:
   
Code: [Select]
set sv_wwwBaseURL "http://your.server.com"

Obviously, you'll want to change the value in step 4.  Note that this URL is just the start of the url.  If you have fs_game set to "base" (the default), then the clients will attempt to download:
  http://your.server.com/base/themissing.pk3

My server (tremulous.tjw.org) has this enabled already, so you can test the client there when one of the custom maps is running.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
In-Game HTTP/FTP downloads
« Reply #1 on: August 28, 2006, 01:30:34 am »
Ill update sst next time we can.

∧OMG ENTROPY∧

Lava Croft

  • Guest
In-Game HTTP/FTP downloads
« Reply #2 on: August 28, 2006, 02:00:00 am »
I will urge maci to do the same to SATGNU, <3

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
In-Game HTTP/FTP downloads
« Reply #3 on: August 28, 2006, 02:59:40 am »
You don't need to have the tjw client? Holy shit. I'd hug you, but I don't swing that way. You have just solved one of the biggest problems in Tremulous.

By the way, one thing: Make sure that in the next version, you add a mode that tells all clients to download while disconnected, so they don't take up a slot.

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #4 on: August 28, 2006, 03:01:50 am »
Quote from: "Paradox"
Ill update sst next time we can.


That reminds me.  You might want to have a look at the updated server setup instructions for Windows:

http://www.tjw.org/tremulous/SETUP.txt

You can now put the game.qvm in your "Documents and Settings" so you don't have to use the "+set fs_game base2" thing anymore.  This would be less annoying for players since they won't end up with the extra "base2" directory and the autogen confusion it creates.

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #5 on: August 28, 2006, 03:10:04 am »
Quote from: "Odin"
You don't need to have the tjw client? Holy shit. I'd hug you, but I don't swing that way. You have just solved one of the biggest problems in Tremulous.


In order to use the HTTP/FTP downloads in your client you need to use the tremulous binary at http://trem.tjw.org/backport/ .  There is no protocol change, so there is no incompatability issue using older clients if that's what you're asking.

Quote from: "Odin"

By the way, one thing: Make sure that in the next version, you add a mode that tells all clients to download while disconnected, so they don't take up a slot.


The client already disconnects itself when it starts a redirected download.  Unlike ET, there is no server-side option to toggle this behaviour.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
In-Game HTTP/FTP downloads
« Reply #6 on: August 28, 2006, 03:12:00 am »
Quote from: "tjw"
Quote from: "Odin"
You don't need to have the tjw client? Holy shit. I'd hug you, but I don't swing that way. You have just solved one of the biggest problems in Tremulous.


In order to use the HTTP/FTP downloads in your client you need to use the tremulous binary at http://trem.tjw.org/backport/ .  There is no protocol change, so you can use this client to play on servers without the download support and likewise clients without the support can play on servers that do have the support.

Quote from: "Odin"

By the way, one thing: Make sure that in the next version, you add a mode that tells all clients to download while disconnected, so they don't take up a slot.

The client already disconnects itself when it starts a redirected download.  Unlike ET, there is no server-side option to toggle this behaviour.
Well I already have your client(I moderate my clan's server from time to time), I was just wondering if the http/ftp downloads required the use of your client.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
In-Game HTTP/FTP downloads
« Reply #7 on: August 28, 2006, 03:46:59 am »
Ok, one thing I've noticed is, I'd rather not allow people to download from my server itself, so I use the wwwdownload. However, people without your client download straight from my server, lagging it horribly(it's being hosted on my home connection, 1.7mbps down/160kbps up). Can you make a new variable that disallows people with guid's of "XXX" to join, effectively removing all people without your client?

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
In-Game HTTP/FTP downloads
« Reply #8 on: August 28, 2006, 07:31:35 am »
Hey TJW, great changes :)

But, I am not with you on the nerfed Dragoon just yet. Could you please also update the tremulous-svnXXX.patch file?

Thanks a lot!

Greudin

  • Posts: 131
  • Turrets: +1/-1
    • http://tremulous.bricosoft.com
In-Game HTTP/FTP downloads
« Reply #9 on: August 28, 2006, 01:56:47 pm »
NICE ! TY TJW !!

It's up for Bricosoft server, 200kB/s vs 4kB/s previously. Wow.
url=http://tremulous.bricosoft.com][/url]

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #10 on: August 28, 2006, 05:55:44 pm »
The Linux binary would cause a crash when the download finished.  I've uploaded a new version, sorry if it bit you.

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #11 on: August 28, 2006, 06:10:43 pm »
Quote from: "Chojin"
Hey TJW, great changes :)

But, I am not with you on the nerfed Dragoon just yet. Could you please also update the tremulous-svnXXX.patch file?

Thanks a lot!


The server change is only in the engine, so you don't need to use an updated game.qvm, just the tremded binary.

This is all that's changed:
https://bugzilla.icculus.org/attachment.cgi?id=1038

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
In-Game HTTP/FTP downloads
« Reply #12 on: August 28, 2006, 06:42:22 pm »
Do we have to do the redirect to application data, because, while i do have RDC access, it would be easier to just keep the same old system we have.

Also, there is no way to see decon notices from spectator, even when the class has the view teamchat flag on. Is this a bug, or something you will fix.

∧OMG ENTROPY∧

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
In-Game HTTP/FTP downloads
« Reply #13 on: August 28, 2006, 11:01:58 pm »
Oh, the ALT TAB doesnt work anymore. I can minimize trem, but i cant switch to another application.

∧OMG ENTROPY∧

Animal

  • Posts: 4
  • Turrets: +0/-0
In-Game HTTP/FTP downloads
« Reply #14 on: August 28, 2006, 11:28:58 pm »
Now.  I suppose my noob post may get deleted here, but anyhow...

I am trying to play on your server even now, TJW, but - alas!  A new map.  and its 10 MBs too.  ouch.  So slow to download!

So now I want to set up my side of this http/ftp system.  that'd be good.

I wasn't sure if the instructions in your first post were for the gamer, or the server, but I did them anyhow.

And I pointed the download site at http://tremulous.tjw.org/

And it IS downloading, but hella slow (7-8 Kb/s)

I have no idea if I've done this right or what.  feedback?

           -Your friendly neighbourhood Noob,  Rigel (Animal)

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #15 on: August 28, 2006, 11:32:13 pm »
Quote from: "Paradox"
Oh, the ALT TAB doesnt work anymore. I can minimize trem, but i cant switch to another application.


It's disabled by default since it causes problems for some people:

You can turn it on with:

Code: [Select]

/win_allowAltTab 1

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #16 on: August 28, 2006, 11:33:28 pm »
Quote from: "Animal"
Now.  I suppose my noob post may get deleted here, but anyhow...

I am trying to play on your server even now, TJW, but - alas!  A new map.  and its 10 MBs too.  ouch.  So slow to download!

So now I want to set up my side of this http/ftp system.  that'd be good.

I wasn't sure if the instructions in your first post were for the gamer, or the server, but I did them anyhow.

And I pointed the download site at http://tremulous.tjw.org/

And it IS downloading, but hella slow (7-8 Kb/s)

I have no idea if I've done this right or what.  feedback?

           -Your friendly neighbourhood Noob,  Rigel (Animal)



I think you were following the server setup instructions.  For the client, you only need to get the latest .exe from http://trem.tjw.org/backport/.

vcxzet

  • Guest
In-Game HTTP/FTP downloads
« Reply #17 on: August 28, 2006, 11:35:21 pm »
TJW YOU ROCK

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
In-Game HTTP/FTP downloads
« Reply #18 on: August 29, 2006, 01:26:45 am »
I just noticed that when i ran a cvarlist.

∧OMG ENTROPY∧

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
In-Game HTTP/FTP downloads
« Reply #19 on: August 29, 2006, 06:17:33 pm »
Quote
This is all that's changed:
https://bugzilla.icculus.org/attachment.cgi?id=1038


Thanks Tony :)

It might be interesting for Windows users, that pk3-downloads and autogen.cfg will be stored at %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\Local Settings\Application Data\Tremulous.

vcxzet

  • Guest
In-Game HTTP/FTP downloads
« Reply #20 on: August 29, 2006, 07:08:21 pm »
Quote from: "Chojin"
Quote
This is all that's changed:
https://bugzilla.icculus.org/attachment.cgi?id=1038


Thanks Tony :)

It might be interesting for Windows users, that pk3-downloads and autogen.cfg will be stored at %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\Local Settings\Application Data\Tremulous.

yes it was really interesting after trying to change a bind for 10mins

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
In-Game HTTP/FTP downloads
« Reply #21 on: August 30, 2006, 05:30:24 am »
From README.txt:
Code: [Select]
* win32 builds add a "home path" in /Documents and Settings
* cURL support for HTTP/FTP downloads.  cl_allowDownload and cl_wwwDownload
  both need to be set to 1 (the server also needs to be patched and configured
  for this to work).


Maybe rephrase to:

Code: [Select]
* cURL support for HTTP/FTP downloads.  cl_allowDownload and cl_wwwDownload
  both need to be set to 1 (the server also needs to be patched and configured
  for this to work).
* Win32: Support for per-user-settings in \Documents and Settings\<USERNAME>
  \Local Settings\Application Data\Tremulous (autogen.cfg will be automatically
  copied; downloads will be placed there).


I'd also like suggest to remove this per-user-settings support in the client,
since it makes things a little complicated or at least confusing,
for as long as it's not integrated in the official client.

vcxzet

  • Guest
In-Game HTTP/FTP downloads
« Reply #22 on: August 30, 2006, 09:12:27 am »
it is good actually. it allows different setups for different users.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
In-Game HTTP/FTP downloads
« Reply #23 on: August 30, 2006, 11:18:01 pm »
Yes, so if Bobby is an admin on a server, his brother Tommy cant come in and admin.


This will prevent things like
Quote from: "looser"
I didnt abuse admin power, that was my brother/roommate/spouse/friend

∧OMG ENTROPY∧

Chojin

  • Posts: 96
  • Turrets: +0/-0
    • http://wraths.dyndns.org
In-Game HTTP/FTP downloads
« Reply #24 on: August 31, 2006, 02:00:31 am »
Well, that would actually be nice, but the qkey file containing your GUID is still (at least on my system) in the game folder of tremulous, not in Documents & Settings.

I don't disagree that it is a nice feature, but people switching to tjw's client currently might get confused because they change the wrong autogen.cfg.

tjw

  • Posts: 210
  • Turrets: +10/-0
In-Game HTTP/FTP downloads
« Reply #25 on: August 31, 2006, 03:14:51 am »
FYI: the PPC portion of the Mac backport build doesn't appear to work...

Lava Croft

  • Guest
In-Game HTTP/FTP downloads
« Reply #26 on: August 31, 2006, 08:31:16 am »
*cough* all my sshots are saved in this screwed up location *cough* <3

squishy

  • Posts: 91
  • Turrets: +1/-0
In-Game HTTP/FTP downloads
« Reply #27 on: August 31, 2006, 04:03:54 pm »
My 2 cents, I'd prefer to point to the entire path of the maps instead of the root path. If I'd rather point to a public space containing the maps instead of my server, I could put the entire url - http://example.com/maps/

The way it is now, the maps would have to be in http://example.com/maps/base/ for some people and http://example.com/maps/base2/ for others.

Better yet, allow us to put the URL in the maprotation list so we can point to a location for the individual maps.
--df

squishy

  • Posts: 91
  • Turrets: +1/-0
In-Game HTTP/FTP downloads
« Reply #28 on: August 31, 2006, 04:11:58 pm »
Oh and this addition would be a really good reason to release 1.1.1 to the public...

my 2 pennies!
--df

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
In-Game HTTP/FTP downloads
« Reply #29 on: August 31, 2006, 05:02:30 pm »
use the edit button.

having to put the /base forces you to change the web server, and therefore proves its a server you have access to, and not omeone like tremulous.info who's bandwidth you are stealing.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.