Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 12:06 pm

All times are UTC




Post new topic Reply to topic  [ 934 posts ]  Go to page 1, 2, 3, 4, 5 ... 38  Next
Author Message
 Post subject: GSD's Updater
PostPosted: Tue Jan 16, 2007 2:27 am 
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?


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 2:38 am 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
Compress the file at the update server's runtime, send the compressed file, client uncompresses it.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 2:40 am 
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?


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 2:49 am 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
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.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 2:51 am 
Haha. Dude I get lost in your source. Lol.

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

XD


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:52 am 
Offline
Regular
User avatar

Joined: Tue Jul 04, 2006 5:50 am
Posts: 98
Yeah... this updater is EXTREMELY slow... never got around to updating it =P


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 2:11 pm 
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.


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 3:21 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
Technically, I think it would be still considered slow if you download less. :wink:

Yup, I'm an ass.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 3:25 pm 
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


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:16 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
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)

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:26 pm 
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. ^_^


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:33 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
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.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 5:42 pm 
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. =\


Top
  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 11:31 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
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:

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 11:42 pm 
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?


Top
  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 12:04 am 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
Exactly. The AllFilesInFolder is there to prevent you from having to specify the paths of the files - it just does them all for you.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 1:27 am 
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.


Top
  
 
 Post subject: Re: GSD's Updater
PostPosted: Wed Dec 01, 2021 1:24 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:44 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
kbps


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:45 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
205.34


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:46 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
PERF


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:47 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
PERF


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:49 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Scha


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:50 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Agen


Top
 Profile  
 
 Post subject: Re: GSD's Updater
PostPosted: Mon Jan 31, 2022 9:51 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Wind


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 934 posts ]  Go to page 1, 2, 3, 4, 5 ... 38  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group