Mirage Source
http://www.miragesource.net/forums/

GSD's Updater
http://www.miragesource.net/forums/viewtopic.php?f=201&t=1168
Page 1 of 38

Author:  Matt [ Tue Jan 16, 2007 2:27 am ]
Post subject:  GSD's Updater

I've been toying with it, and put my sprite sheet up to test it, the sprite sheet is 13mb, and it tries to download the file, but it doesn't. It downloads a 0kb file named Sprites.bmp, but that's it. And it claims that the game is updated.

Anyone have any idea?

[EDIT]

Nevermind, it was because the updater was trying to download Sprites.bmp, and the file was Sprites.BMP.

But this is super slow, any one have any idea how to speed it up?

Author:  Spodi [ Tue Jan 16, 2007 2:38 am ]
Post subject: 

Compress the file at the update server's runtime, send the compressed file, client uncompresses it.

Author:  Matt [ Tue Jan 16, 2007 2:40 am ]
Post subject: 

I just talked to Shan about this, he said it's because the updater uses INet instead of pure winsock.

I have no idea how to convert it. Lol.

Any idea Spod?

Author:  Spodi [ Tue Jan 16, 2007 2:49 am ]
Post subject: 

Ah, I thought you had an actual update server that sent the files. If you are retrieving files from the internet, then you completely limit yourself on what you can do. You would have to manually compress then upload them. Theres tons of compression algorithms out there. I personally use RLE, RLE(Looped) and ZLW for all my compressions. RLE is fastest and worst compression, while ZLW is slowest and best. As for the speed VS compression rate ratio, it is pretty bad - ie, lets say ZLW was 3x slower, it'd probably only compress about 15% better. RLE(Looped) is RLE but keeps looping until there is no compression, and is often quite fast still.

The code and an easy wrapper for these are all in vbGORE's source if you're interested. All you have to do is load a file with Compression_Compress <source file>, <destination file>, <compression algorithm>, then the same thing with Compression_Decompress.

Author:  Matt [ Tue Jan 16, 2007 2:51 am ]
Post subject: 

Haha. Dude I get lost in your source. Lol.

Care to get on MSN and help me out? Please?

XD

Author:  GodSentDeath [ Tue Jan 16, 2007 5:52 am ]
Post subject: 

Yeah... this updater is EXTREMELY slow... never got around to updating it =P

Author:  Matt [ Tue Jan 16, 2007 2:11 pm ]
Post subject: 

I'm adding unzip abilities to it, that way, it's actually decently fast. Since image files zip up really small. Went from 13mb to 750kb. Give or take, of course.

Author:  Spodi [ Tue Jan 16, 2007 3:21 pm ]
Post subject: 

Technically, I think it would be still considered slow if you download less. :wink:

Yup, I'm an ass.

Author:  Matt [ Tue Jan 16, 2007 3:25 pm ]
Post subject: 

Yeah, so what. It doesn't take an hour to update the sprites anymore, it only takes about 30 seconds or so.

But yet I can't get the unzip stuff to properly work.

Meh.

Spod I'm sure you have a method you'd like to share? =P

Author:  Spodi [ Tue Jan 16, 2007 5:16 pm ]
Post subject: 

Sure, create your own compression tool. Download vbGORE, take the Compressions.bas and AllFilesInFolder.bas from the \Code\Common Code\ folder. Use AllFilesInFolder to get all the files in the folder that you specify, then use the compression (probably LZW since you're only compressing once per update). Enter in your source path you got from the AllFilesInFolder's return array of file paths, then enter the destination path as SourcePath & ".compressed" or something. That way, when you decompress it client-side after updating, you specify the destination as the same path but minus the ".compressed". Bam, 1 click all-file compression, and easy compression/decompression with a single sub call. Can't get any easier then that! 8)

Author:  Matt [ Tue Jan 16, 2007 5:26 pm ]
Post subject: 

You lost me. Completely. Just like last night. Lol.

I think I'm going to just use zip for now, and when I research compression and what not more, I will then try a different method.

As of right now, I'm trying to use Info Zip's UnZip method. Though it's not the easiest method whatsoever, I have a wrapper for it, but still get issues. I will have to research it a bit more. ^_^

Author:  Spodi [ Tue Jan 16, 2007 5:33 pm ]
Post subject: 

What I mentioned doing would be a HELL of a lot easier to implement. One call to compress, another to decompress. All you do is specify the source file, destination file, and the compression used. One line of code - you can handle it. :wink: Also, then you don't have to have one huge zip, so if you get disconnected, you loose everything and have to start over. Dial-up users will hate you forever.

Author:  Matt [ Tue Jan 16, 2007 5:42 pm ]
Post subject: 

Haha, that's true.. Hm..

You said this stuff is in the vbGORE source, or the updater's source?

[EDIT] Nvm, found it.

Mind showing me how to use it? I dunno how to compress/decompress with this. I find no calls to any of the code in the updater client/server source. =\

Author:  Spodi [ Tue Jan 16, 2007 11:31 pm ]
Post subject: 

Get all the files in a folder:

Code:
Dim FileList() As string
FileList = AllFilesInFolders(<FilePath>, True) 'Last True means we are using subfolders - false for no


FileList() now contains a path of a file in that folder in each index. FilePath(1) = first file, FilePath(2) = second, etc.

Compress file:
Code:
Compression_Compress <Source file (Read from)>, <Destination file (Write to)>, <Algorithm>


IE:

Code:
Compression_Compress "C:\Temp.txt.compressed", "C:\Temp.txt", RLE_Loop


C:\Temp.txt is compressed and saved as C:\Temp.txt.compressed (old file is untouched, just a new compressed one is made), using the RLE_Loop compression.

Decompression is the same.

See? Easy. :wink:

Author:  Matt [ Tue Jan 16, 2007 11:42 pm ]
Post subject: 

Okay, seems pretty easy. So the best bet, would be for me to use the decompress method in the updater and create a side program to compress the files, correct?

Author:  Spodi [ Wed Jan 17, 2007 12:04 am ]
Post subject: 

Exactly. The AllFilesInFolder is there to prevent you from having to specify the paths of the files - it just does them all for you.

Author:  Matt [ Wed Jan 17, 2007 1:27 am ]
Post subject: 

Okay, I got it working, the RLE_Loop knocked off 10mb from the file, which is really good. But it's so slow at compressing/decompressing. =\

Oh well, it will have to do for now. ^_^

Thanks alot Spodi.

Author:  wanai [ Wed Dec 01, 2021 1:24 pm ]
Post subject:  Re: GSD's Updater

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Mon Jan 31, 2022 9:44 pm ]
Post subject:  Re: GSD's Updater

kbps

Author:  wanai [ Mon Jan 31, 2022 9:45 pm ]
Post subject:  Re: GSD's Updater

205.34

Author:  wanai [ Mon Jan 31, 2022 9:46 pm ]
Post subject:  Re: GSD's Updater

PERF

Author:  wanai [ Mon Jan 31, 2022 9:47 pm ]
Post subject:  Re: GSD's Updater

PERF

Author:  wanai [ Mon Jan 31, 2022 9:49 pm ]
Post subject:  Re: GSD's Updater

Scha

Author:  wanai [ Mon Jan 31, 2022 9:50 pm ]
Post subject:  Re: GSD's Updater

Agen

Author:  wanai [ Mon Jan 31, 2022 9:51 pm ]
Post subject:  Re: GSD's Updater

Wind

Page 1 of 38 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/