   File Patching Systems
  Hiya,Does anyone know the methods used in games like Unreal Tournament, Battle for Middle Earth etc when you play online how it will not let you connect to the lobby or the next level unless you have the latest client and all the relevant files? I understand what happens but what I'm looking for is the best and most efficient method for file transfer, ftp, http, socket transfer or another method?Regards   
  If you have access to a clean HTTP client and server implementation (such as the one in .NET) then you could use it to have the game client query other clients for the file. The main drawbacks are the stateless nature of HTTP and the fact that it  needs another port to be open (thus causing problems with firewalls and ISPs). Failing that, a networked game will generally already have an infrastructure set up to transfer data to and from the other clients as well as the server, so it would generally amount to sending a request for the hash of a file (to check versions) and then asking for compressed bytes N to M from the file.   ;  Issues of transfer protocol aside, its generally best to send only the incremental differences between the existing file and the new (patched) file. This virtually requires using a dedicated patch server, however, as it can be a real pain to figure out the incremental difference between client-side files.Actually, I'd shy away from using other clients to figure out which files to patch and what the patch content is, as that opens you up for abuse.   ;Quote:Original post by jpetrieActually, I'd shy away from using other clients to figure out which files to patch and what the patch content is, as that opens you up for abuse."Relevant files" might include personalized player logos or custom maps/sounds/textures downloaded from the server before the game starts that are not part of any "official" game patch. Besides, Unreal Tournament patches were generally backwards compatible: you could play on a server with a compatible version without patching your own client, you only had to download files used by the server for that particular game. ;Quote:"Relevant files" might include personalized player logos or custom maps/sounds/textures downloaded from the server before the game starts that are not part of any "official" game patch.Okay, that's true. I thought you meant grab everything like that; if a patch file you grab from a client like that is a patch to the actual .exe or some other executable code, it much easier for a hacker to exploit in a way that lets them do naughty things to your version of the game.   ;  Thanks for the useful discussion guys. I should have elaborated on 'relevant files' a little more. Indeed I meant as ToohrVyk suggested and it could include logos and customised graphics as well as official patched content of say maps and models. I plan on not having backward compatibility for 'official patches' though as the content needs to be changed on all clients.I expect that the best method for me for downloading a new map between levels if the current client doesn't have those relevant files to use the networking code that would be produced for the game for file transfer. jpetrie, the incremental transfers does sound intresting, might see if I can find a paper or two on this method. Thank you both for the ideas.   