Patches/Updates

Started by
5 comments, last by nukimistudios 15 years, 9 months ago
Hello everyone, We're currently just a few hobbyists who are planning an online multiplayer strategy game. We have reasonably in depth plans and combined competance in C++ which is the language we'll be using. Before we dive into coding we're looking to find out a bit more on the fields where our is experience is...well, non-existent. In particular we really need to work out how to implement some sort of updating system. We've never attempted a project on this scale before so if anyone has any experience with patches, we would really appreciate any help you can give us on how to make this system and how, if it's possible, to make it work on the Xbox 360 console. Hopefully we'll have something to give back before too long :). Thanks in advance. PS : I've posted it in this forum because I suppose this is a fairly simple aspect of game programming. Sorry if it should be somewhere else.
Advertisement
Well, simply said, you could just have an additional application check if there are new updates out there and download/install these. The Updater would launch, connect to the server and request the current version. It would compare this to the local installed version, and if there's a newer version, it would request a file list and download/install these files.

The most simple approach would be to download all the changed files in full to a temporary folder, and when downloaded, it would copy them over the others. In a more efficient approach, you'd only index the changes per file and send these down the line. Less bandwidth needed, but more processing power needed(Which is expandable, since bandwidth is more expensive for the hosting party anyway).

Toolmaker

Thanks alot. We're going to have a launcher (within login details, etc) before the actual game starts, so we'll do all the updating at that point.
I'm a little confused however, as to how you can update a file without completely replacing it? That'll be very frustrating when we're updating anything big.
Patching is quite an interesting process, really.

What actually happens is you don't replace the whole file, you replace any contents that have changed and add any required new contents within said file. This is why programs can, and sometimes do, go tits up if you abort a patch installation before it's finished because you've borked the internal compiled code.

Don't quote me on this because I'm no expert, but I think a downloaded patch exe from a website e.g. for a game contains an installer for the patch which knows what to change in the original exe and what to overwrite it with, and also where to add new bits of code. It's not just the brand new, 100% complete exe, it's just the changes that need to be made which are then applied to the exe or other game file in question.

I think that answers your question on how to update a file without completely replacing it, because that's how the patch process works. Think of it in terms of clothing back in the old days; you have an old school tweed jacket and you wear a hole through the elbow... do you replace the jacket? Nope, stitch a leather patch over it. All patches basically do is "patch" holes and problems in software, and occasionally add new features too.

It seems to me like you're trying to do something along the lines of Steam. Bear in mind that Steam won't let you run a game while it's updating or if the update is incomplete, so you don't need to worry about overwriting or editing files that are currently in use (that is, providing your launcher isn't within the game binary itself at all).
Right, yeah. Thanks.
So the launcher should be completely seperate and not launch the game until any updates have been finished.
So now I understand the concept it's just a matter of implementing it.
This will probably sound stupid - would it be a matter of comparing the binary of the 2 and changing it accordingly to match the updated version?
At a guess- there may be instructions emebedded within the patch that states the location in the file that operations occur such as removing sections of the file or adding bits to the file. Thats probably how I'd do it anyway.
Thanks. So does anybody know anything about this for xbox 360? Or should I perhaps make a post in the console forum?

This topic is closed to new replies.

Advertisement