Game Development Community

Auto-Update functionality

by BigPapa · in Torque Game Engine · 01/18/2006 (2:40 pm) · 5 replies

Hello Gang,

I've been looking around for information on how to add auto-update (auto-patch) in TGE but I can only find bits and pieces. There are a lot of people who have created their own for their projects but there is not central repocitory of information.

I would like to create a basic auto-update utility for TGE and create a resource to share it back with the community. Then let the community build upon that.

Any info you can share is greatly appreciated.

Thx!

#1
01/18/2006 (2:57 pm)
To be honest, auto-update isn't that hard. All you need is a repository on the web that keeps up with versions. If you have a document at http://www.yourserver.com/document.txt which describes the latest version, you can just fetch that document, read it, and act accordingly.

That's when you update the data files. Updating the engine is a bit more work, but should be perfectly straightforward. Maybe the people who wrote something could explain their choices and why they made them.
#2
01/18/2006 (3:31 pm)
I think that Josh Ritter explains in pretty good detail how he did his for Minions of Mirth. Look around for that, and it should give you a good idea.
#3
01/19/2006 (10:01 am)
@David - What you describe is basically what I was thinking of. It's that last detail about "act accordingly" that is not clear how to aproach it. Should it be done in the engine or a third party tool?

From the Minions of Mirth Brief Post Mortem post, I see that they used Subversion with python. I'll look into that and see how complicated is it to integrate into TGE.

Still, if anyone wants to add to this thead, please do so.
#4
01/19/2006 (10:47 am)
In many ways, patching is similar to save/load functionality. It is often difficult to implement as a pure engine function versus a game-specific function because you do not know what data the developers will add to the system, what data they need to work with and change, or how their system scales.
#5
01/19/2006 (11:19 am)
We leverage Subversion for your patcher's backend. This is from our game's (brief) Post Mortem:

Quote:4. Subversion (as a cross platform auto-patching solution): We use Subversion for versioning control. The merits of version control on a
project are well documented. I am mentioning Subversion in the post mortem for it's use as a backend to our auto-patching system. I wrote some Python scripts that are able to build demo/full version distributions from the game's sources and data files.

The scripts inspect assets like dif/dts to find out what files are needed. They also open up the RPG Database to find out what textures, sounds, models, etc are actually used. The scripts generate jpg files from pngs and do other operations to get the file sizes down. Multiple SHA checksums are then generated for every file and the results are stored in a manifest.zip file. The client keeps a cache of local SHA checksums and connects to the game's Subversion repository which is being served over SSL. It requests the manfest.zip and compares the SHA checksums with the local ones. The client then downloads any missing or changed files, verifies them once downloaded, requests the user to restart the application, and then copies the new files into the install. It's all very anal and has performed beautifully. It was awesome to painlessly patch users during the beta process. I don't remember getting one complaint!

-Josh Ritter
Prairie Games, Inc