Main

Forums

Wiki

Downloads

Tutorials

Walkthrough

Unreal-netiquette

Links

Submit-News

Oldunreal's hosted:
UnrealReference

Usermaps

Real-CTF

Donate for Oldunreal:

Oldunreal Donation
Oldunreallogo
  Welcome, Guest. Please Login or Register
 
  HomeHelpSearchLoginRegister  
 
 
Save unfinished cache files (Read 6189 times)
.:..:
Developer Team
Offline



Posts: 1239
Finland
Gender: male
Save unfinished cache files
04/19/07 at 13:48:24
 
I had this idea while seeing those temp cache files..
Would it be possible to make it save unfinished downloads in some directory and next time ur about to download the same file again it would continue downloading it. It's just so frustating when ur downloading a 10 MB file at 95 %, then server map change and you have to start over.. or is the idea too time consuming to make?
Back to top
 
.:..: 345236034 mhulden  
IP Logged
 
Shivaxi
Oldunreal MasterPoster
The One Who Wanted To Have A Special Title In Forum
******
Offline


Loving Pie

Posts: 2135
BEHIND U!!!
Gender: male
Re: Save unfinished cache files
Reply #1 - 04/19/07 at 20:54:07
 
omfg...this is a really good idea...i totally agree .:..:   I dunno how this would work but it does seem possible Tongue
Back to top
 

...  ...
WWW WWW Shivaxi 350876527 Shivaxi13 Shivaxi  
IP Logged
 
Bane
Senior Member
****
Offline



Posts: 496
Gender: male
Re: Save unfinished cache files
Reply #2 - 04/20/07 at 00:20:10
 
I'd assume that doing this would be relatively simple. While downloading the file, occasionally dump what has been downloaded so far into the file <GUID>.tmp. When starting a download, check to see if this file exists. If so, open the file and resume the download from there. I've never tried doing anything with saving files in C++, but I can't imagine that it would be too difficult to implement ths.
Back to top
 

Author of Hide and Seek mod, and the NALIBALL mod&&&&Hide and Seek can be downloaded from:&&http://HideNSeek.5u.com
Bane+908  
IP Logged
 
Smirftsch
YaBB Administrator
******
Offline



Posts: 5471
at home
Gender: male
Re: Save unfinished cache files
Reply #3 - 04/20/07 at 08:14:04
 
didnt mess with these things yet, but i think the problem is maybe more the resume than to save it.
Back to top
 

Sometimes you have to lose a fight to win the war.
WWW WWW Smirftsch 52832995  
IP Logged
 
TCP_Wolf
YaBB Administrator
Developer Team
******
Offline



Posts: 1062
Next to your flag!
Re: Save unfinished cache files
Reply #4 - 04/24/07 at 06:47:51
 
Yea sounds like requiring a few intelligent changes to both server and client. File handling itself is easy (relatively) and fast in C++. But you know things are ALWAYS more complicated than they first appear :-O
Back to top
 

-=]HONESTY PAYS[=-
WWW WWW 99235738  
IP Logged
 
DieHard SCWS
Global Moderator
******
Offline


DìèHárdsDòG»§ÇW §

Posts: 2043
Holland
Gender: male
Re: Save unfinished cache files
Reply #5 - 04/26/07 at 01:50:12
 
I often notice a Cache0000.tmp (Cache0001.tmp, Cache0002.tmp, etc.) files sitting in the root of my Unreal folder.


To me it always looked like a cache Temp like discussed here, but disfunctional.  In other words, it looks like the Temp is created, but is indeed unable to resume. Unless you guys tell me those files are something different, but that is what i always thought........
.
.
.
Back to top
 
 
IP Logged
 
Smirftsch
YaBB Administrator
******
Offline



Posts: 5471
at home
Gender: male
Re: Save unfinished cache files
Reply #6 - 04/26/07 at 07:00:23
 
no, you are right. It is what you think.
But on the other hand, it might be not necessary at all when the download is fixed. I tried it with havoks suggestion to set the tickrate of the server to 70- long time i ago i saw such a fast download. So there must be a way to fix that.
Back to top
 

Sometimes you have to lose a fight to win the war.
WWW WWW Smirftsch 52832995  
IP Logged
 
Bane
Senior Member
****
Offline



Posts: 496
Gender: male
Re: Save unfinished cache files
Reply #7 - 04/26/07 at 18:10:22
 
huh. I had no idea that's what those were for. I thought it was saved information from the pre-caching (not that I know what that is...). I just opened one of them in a hex editor and didn't see the GUID for it. If the GUID isn't in there (and it isn't in the file name), there's no way it could possibly resume. I'm guessing it's just a temp file that stores the information as it's received so it doesn't all have to stay in memory at once. The file format for these could probably be modified somewhat to allow recovering downloads.
Back to top
 

Author of Hide and Seek mod, and the NALIBALL mod&&&&Hide and Seek can be downloaded from:&&http://HideNSeek.5u.com
Bane+908  
IP Logged
 
.:..:
Developer Team
Offline



Posts: 1239
Finland
Gender: male
Re: Save unfinished cache files
Reply #8 - 04/26/07 at 23:06:07
 
Well once I saw some map data in 1 of those temp files like "Brush103" "Nali1" etc...
So, I think it stores the currently finished downloads there while game is downloading, then when its finished it moves the file to cache folder and renames it. Maybe some unexpected shut down makes unreal not to delete them when download cancels (crash, exit?).
Back to top
 
.:..: 345236034 mhulden  
IP Logged
 
Bane
Senior Member
****
Offline



Posts: 496
Gender: male
Re: Save unfinished cache files
Reply #9 - 04/27/07 at 00:01:08
 
Actually, even pressing F10 causes the files to remain. Perhaps they had intended support for incomplete downloads at some point and just never finished it. Even if the files did persist after a crash when they should've been deleted, unreal could just clean them all out on next startup, like with purgecachedays
Back to top
 

Author of Hide and Seek mod, and the NALIBALL mod&&&&Hide and Seek can be downloaded from:&&http://HideNSeek.5u.com
Bane+908  
IP Logged
 
Smartball
Global Moderator
******
Offline



Posts: 232
Gender: male
Re: Save unfinished cache files
Reply #10 - 08/01/07 at 14:39:46
 
I wrote an instant messaging program in C# once that allowed users to resume previous downloads from other users. The idea actually isn't difficult at all, assuming the files are sent sequentially (starting at byte 0 and ending at the last byte, which I assume it is). When the server is rattling off the server packages to the client, and the client checks to see if it has each package, if it encounters a package that it doesn't have, it simply needs to check if <GUID>.tmp exists (as Bane said). If it does exist, then all it needs to do is send back the file size of the .tmp file to the server, and the server should begin transferring the file to the client at that offset, and the client should begin appending. If the file doesn't exist, the client just sends back 0 so the server begins sending from the 0th offset, or the beginning of the file. It's easy in theory and was easy to implement as well, as long as the files are sent from server to client starting at byte 0 and ending at the last byte (I can't imagine any reason why it wouldn't be sent in order, but just thought I'd stress it lol.)
Back to top
 

Of all the things I've lost, I miss my mind the most.
 
IP Logged
 
TCP_Wolf
YaBB Administrator
Developer Team
******
Offline



Posts: 1062
Next to your flag!
Re: Save unfinished cache files
Reply #11 - 08/02/07 at 15:43:04
 
It __might__ be a good idea to have a "resume window" of 1 or 2k in size, because sometimes when a download breaks the last few bytes are corrupted. Or as a safeguard, the client could simply discard the last couple of bytes when it broke. By principal it does work of course....
Back to top
 

-=]HONESTY PAYS[=-
WWW WWW 99235738  
IP Logged
 
[§Ŕ] ŤhěxĐâŕkśîđěŕ
Oldunreal MasterPoster
******
Offline


「エレクトロマスター」

Posts: 4444
Out of space-time continuum
Gender: male
Re: Save unfinished cache files
Reply #12 - 01/18/10 at 00:05:15
 
Bump for justice.

I guess it'd also then keep the download and not restart it from the beginning if the server switches maps, that's really annoying when it happens.
Back to top
 

WWW WWW [§Ŕ] ŤhěxĐâŕkśîđěŕ  
IP Logged
 
Hyper
YaBB Administrator
******
Offline


It's Unreal.

Posts: 2158
Re: Save unfinished cache files
Reply #13 - 01/19/10 at 14:00:37
 
.:..: wrote on 04/19/07 at 13:48:24:
I had this idea while seeing those temp cache files..
Would it be possible to make it save unfinished downloads in some directory and next time ur about to download the same file again it would continue downloading it. It's just so frustating when ur downloading a 10 MB file at 95 %, then server map change and you have to start over.. or is the idea too time consuming to make?


The idea sounds fine to me. Not a critical feature but surely nice to have. But why don't you make it yourself, now you're in the dev team?  Wink
Back to top
 
WWW WWW Hyper 50474827 Hypernl_dot_tk hypernl  
IP Logged
 
.:..:
Developer Team
Offline



Posts: 1239
Finland
Gender: male
Re: Save unfinished cache files
Reply #14 - 01/19/10 at 20:35:04
 
Hyper wrote on 01/19/10 at 14:00:37:
The idea sounds fine to me. Not a critical feature but surely nice to have. But why don't you make it yourself, now you're in the dev team?  Wink

Actually it's very hard for me to do that without the source code of Unreal Engine 1. Even so it might not be worth the time and all the trouble with debugging it when HTTP redirecting handles downloading very fast anyway.
Back to top
 
.:..: 345236034 mhulden  
IP Logged