How exactly would I make a game file updater?

BlitzPlus Forums/BlitzPlus Programming/How exactly would I make a game file updater?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I do something a bit different :)

I have a file where I store an "update cookie". When the game is started, I pass the update cookie to a PHP script with an HTTP request. It returns me the list of files I need to download, the type of file (archive, game data, or the updater itself).

I download the files and do whatever I need with them (I use bzip2.dll for compression, which provide best compression ever; if anyone want the decls and the dll, just ask). If I need to update the updater itself I generate a batch-file for that (or use my "rerun.exe" binary, a little code in C which does the work).

Each time I've installed an update, I save the current "update cookie" so if I get interrupted I can start from where I stopped.

The problem with CRC is simple. When, like me, you have 800MB of data, it may take a while to check it all :)

Also if you want to use FTP, you can, but make sure you use an anonymous FTP (most likely you'll need a dedicated server).

I wrote a simple http_download function, with resume support, which does a great job. :)