lfnetwork.com mark read register faq members calendar

Thread: FTP/HTTP File downloads for JA
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-24-2004, 01:26 AM   #1
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
FTP/HTTP File downloads for JA

I'm just a few baby steps away from having ftp/http support in for clients connecting to servers. I've ran into a small snag and am lost for ideas. While I'm gone for the weekend I thought I'd let some of you ponder at ways of doing the following:

I have full ftp/http capabilities built into the client at this point. I am trying to hijack server downloads in some way to tell the client to download specific pk3 file from a location. I could do it very easy from in game while they play but that doesn't fix the issues of 2k downloads while connecting to the server.

What I need is a way to fool the client into connecting part way and getting download information from the server (for remote http/ftp pk3 files) before it actually connects to the server and does it's gimp download.

Any ideas

My temp solution to this issue is throw public maps into the rotation and then while people are playing it would download the next map in the rotation (that the client doesn't have). I have threads and the ftp/http stuff all setup. It's really easy this way as I can just send the client a command to get a pk3 from a location or test if one is there. More of a pain in the ass to catch it while they are connecting.

=X=Master HeX is offline   you may: quote & reply,
Old 07-24-2004, 07:44 PM   #2
Amidala from Chop Shop
Politically-correct jerk
 
Join Date: Mar 2003
Location: In exile
Posts: 1,433
I hope you remember this post from the =X= forum:


Quote:
6. Redirection of map downloads to specific URL's as is available in RTCW:ET. It is almost impossible to convince people to download custom maps, but this feature makes it easy and is widely used\liked by the RTCW:ET community:

"quick question actually. How many people are using the http/ftp downloads? Server wise and client wise? Do you know many server admins who use it? Any things you'd like to comment about it?"


"IMHO it's the best new server-side feature in a Q3-type engine ever. The servers I know that are using it are Timelord and the BoD clan server, but there are probably many more."


Here are the cvars:

set sv_maxRate "13000" // 10000 standard but poor for ET
set sv_dl_maxRate "42000" // increase/decerease if you have plenty/little spare bandwidth
set sv_allowDownload "0" // global toggle for both legacy download and web download
set sv_wwwDownload "0" // toggle to enable web download
set sv_wwwBaseURL "" // base URL for redirection
set sv_wwwDlDisconnected "0" // tell clients to perform their downloads while disconnected from the server
set sv_wwwFallbackURL "" // URL to send to if an http/ftp fails or is refused client side

Source code is here: http://www.splashdamage.com/modules....download&sid=8

If xMod2 made this available to the Jedi Academy community it would be a HUGE selling point.
Maybe the people at www.splashdamage.com will share the part of the code that does that for RTCW:ET.

Amidala from Chop Shop is offline   you may: quote & reply,
Old 07-25-2004, 04:04 PM   #3
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,162
Sounds like an interesting idea but wouldn't that majorly lag the players while their systems get the maps?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 07-26-2004, 05:59 PM   #4
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
Depends on the connection and how much bandwidth I hog while it grabs the maps. I took a look at the splash dmg code and it looks like they had access to part of the q3 engine that I don't have access to in JKA. I'll be working on this all week though. I had a few ideas during my trip this weekend. =)

=X=Master HeX is offline   you may: quote & reply,
Old 07-27-2004, 03:19 PM   #5
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,162
*shrug* I don't know. sounds like you'd have to code a new network interface from scratch. I don't think it's worth it.

I'd suggest that you have it just display the map download url.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 07-31-2004, 05:07 PM   #6
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
i think i got you covered hex

assuming that you can pass the url of a specific file with the ftp/http cod you have in your client (i'm assuming you lifted something from lynx or a mozilla or whatever)

you need to implemnt 1 additional cvar that gets changed in the server's config for each map

so in the server's config instead of having

Code:
map mp/ctf_ns_streets
you'd need

Code:
map mp/ctf_ns_streets ; g_currentmapUrl www.whatever.com/ctf_ns_streets.pk3

now that you've got that cvar in, check out "void CG_ParseServerinfo( void )" in cg_servercmds.c this is where the client reads all the server's relavant cvars and is where you can send the g_currenmapUrl to the client without having them load the map. of course you'd need a client side struct to store the information in. i don't think it's really nessicary to store it clientside in a cvar

i don't think we can automatically being downloading in the client via your http/ftp module because it seems to be in the engine and outside the scope of the sdk

i could be wrong

but, if the server keeps automatic downloading off, and sends the map url to every client that tries to connect, then the clients can simpling run a command (when/if the map load fails) like /getmap (or something) that would pass the url from g_currentmapUrl (now stored in a clientside struct) to your http/ftp module and begin the tansfer and perhaps do /reconnect automatically when it's done?


or, check outvoid UI_DrawConnectScreen( qboolean overlay )

this function does the screen drawing for when the engine starts it's download, but since it's at the correct time, maaaaybe in


Code:
case CA_CONNECTED
you could perform the key sequence to break out of the download (i think it's escape) and start your tranfer module? i guess it'd work.


now, care to share with us how you got http/ftp working? i've looked at serveral of the smaller command line ftp clients and i've got some ideas but it'd be really helpful if you'd share it with us



-stu
stubert is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > FTP/HTTP File downloads for JA

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:22 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.