ID:1908255
 
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Would be nice if you could have a preload_rsc that would still utilize .zip files on a remote URL but instead of putting it in another RSC it would dump the zip contents in the users cache folder.
Does preload_rsc even work? Last I checked it just caused every connecting client to crash.
I haven't been able to get it to work since at least 4.0
Crash? Well that's no good. If you can provide some details on that it'd be helpful.

I know SilkWizard uses preload_rsc with a URL in NEStalgia.

I really like the idea of being able to point preload_rsc to a non-rsc zip, though I'd have to look at how that works and how I could modify the setup to handle that. It'd still be importing each file into byond.rsc though, not directly to the cache folder (which I consider unwise); the main advantage IMO is that it'd be easier to keep a non-.rsc zip updated.

Also, now that I think about it, if the remote URL were simply a path that let you index a file folder, then being able to download the files in the folder just by pointing preload_rsc to it would be pretty nifty too.

Altogether I think resource handling needs a lot of love and I'd be very interested in exploring solutions--especially those that moved beyond the current var and what it can do--that would improve it. Resource handling has always been a tricky business, but it's probably one of the areas where I can make a great improvement for big games. It's my hope that the webclient can also benefit from a concept like this somehow.
Preload rsc works yeah and does with a non rsc zip as well, atleast with the latest 508 build however if you're connecting with to localhost it won't trigger a client download so for local testing you need to connect to your remote IP for it to do anything. My main want from the feature is to be able to dump a sizeable amount of files into a user's cache for later browse() usage without tying up more essential browse() calls.
+1-ing this. I've been working on a resource pre-loader for ss13 (goonstation branch) and I'm counting 200 individual files I'm sending on client login. Byond appears to choke with this amount of files and takes 5-10 seconds to download them all even on localhost. A central .zip would vastly improve the download and resource acquisition time.
So, let browse_rsc accept a zip file?
In response to Super Saiyan X
Super Saiyan X wrote:
So, let browse_rsc accept a zip file?

but that would still tie up the client from accepting browse() calls until the download is finished. The good thing about specifying a remote URL with preload_rsc is it is on a different thread and wont prevent the browse() calls on things that are already cached.
+1 had a lot of pain working on preload_rsc before :<
I'm opening this thread up to more general brainstorming on how we can improve preload_rsc.
I'm unfortunately not in a state where I can contribute a lot of facts to this discussion. I've been playing around with distributed worlds in the background, but so far nothing I've done has been worthwhile.

Being able to specify multiple included resource packages and maintaining them as separate items rather than jamming them into a single RSC would be nice. We can already include rscs using the #include directive, but as I understand it, it just jams everything in that rsc into the game's rsc, rather than making separate bundles.

This essentially creates a unique file in the cache and doesn't slim down resource download requirements.
I read brainstorming as brainwashing

Anyways, as the OP wants some way to utilize the preload rsc download stream to preload bulk items in the cache folder for browse usage.

Could maybe make it if its pointed to a directory listing it could grab everything in it?

if you dont want preload_rsc to slap shit into the folder enmasse and just keep it in the rsc files, maybe let browse_rsc use a URL and make that download async so it doesn't prevent other calls
Make a formated way to do a directory listing, that includes md5, crc, or byond32 numbers, so you can do proper only if updated downloading.

Or a special file format for that, and a tool to generate the hashes.

Detecting directory listings is hard, they seem to be a standard format, but they aren't, IIS, apache, ngiux all have their own formats for doing directory listings.

So how about a special resource meta file, with files and their crc/md5/byond32/whatever numbers (and some tool to generate these for a folder) so that we can properly offload the rsc.

As an added plus, maybe make a way to give byond ftp/sftp/rsync info so it can automate the upload.

My intended use would be to completely move the .rsc off server, so that big content updates don't lag the server so bad, and rsc downloads aren't so slow for people overseas. I already have ideas on how to automate this, but since preload_rsc doesn't work as intended, I can't implement them.