=X=Master HeX Posted July 24, 2004 Share Posted July 24, 2004 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. Link to comment Share on other sites More sharing options...
Amidala from Chop Shop Posted July 24, 2004 Share Posted July 24, 2004 I hope you remember this post from the =X= forum: 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.php?op=modload&name=Downloads&file=index&req=viewsdownload&sid=8 If xMod2 made this available to the Jedi Academy community it would be a HUGE selling point. Maybe the people at http://www.splashdamage.com will share the part of the code that does that for RTCW:ET. Link to comment Share on other sites More sharing options...
razorace Posted July 25, 2004 Share Posted July 25, 2004 Sounds like an interesting idea but wouldn't that majorly lag the players while their systems get the maps? Link to comment Share on other sites More sharing options...
=X=Master HeX Posted July 26, 2004 Author Share Posted July 26, 2004 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. =) Link to comment Share on other sites More sharing options...
razorace Posted July 27, 2004 Share Posted July 27, 2004 *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. Link to comment Share on other sites More sharing options...
stubert Posted July 31, 2004 Share Posted July 31, 2004 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 map mp/ctf_ns_streets you'd need map mp/ctf_ns_streets ; g_currentmapUrl [url]www.whatever.com/ctf_ns_streets.pk3[/url] 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 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.