A patching system for released games? Your thoughts.

Should Unity implement a patching system so that we can release updates for our games easily after releasing them? Is this too technically difficult? It is an undesirable for Unity to have? Is it needed/wanted?

I read some old post about this. Some say that its good Unity doesn’t let developers patch their games post production as it forces them to work out as many bugs as possible first. You don’t want your fan base to have to re-download your 5GB game every time you fix a small glitch.

On the other hand, what if you want to add new content to the game to keep it fresh and attract new players?

I would love to be able to add more content and patch in the future. Also, some bugs just can’t be found with alpha and beta testing alone. How many AAA titles have had even game-breaking bugs? I’m fine with working out bugs as much as possible beforehand… but that’s on the reputation of the game developer whether they only have a few bugs that can be easily patched, or the game is simply riddled with them.

That being said, the idea of being able to expand games by patching them is something I am EXTREMELY attracted to.

Released games are just files like any others. I’d have thought that generic patching systems already existed and would work on Unity like anything else?

Might post more when not on my phone…

Depends on the type of content. You can structure you game in a way that core/story content is streamed and stored remotely (characters/levels/environments/quests/items/etc…). It’s not overly difficult, but it does require a fair amount of planning up front. Changes to the core game will require some sort of an update.

I am not familiar with doing desktop releases but it would seem that if you break your biggest chunks of content/data in to assetbundles, then you could keep the core game fairly small. It has classes and methods for loading and caching assetbundles from a remote sever/CDN, so it seems that even there isn’t a way to patch, you can at least minimize the size of updates. But I have never tried or explored this on the desktop, so I may be wrong.

Asset Bundles are precisely made for that purpose, but in my experience not very intuitive, so a whole managed patching system would be great, yeah. Especially in such a DLC / IAP era.

Isn’t desktop patching essentially just replacing old files with updated ones, or doing an equivalent thereof such as applying a diff with updated files, and adding new ones as required? I’m not seeing anything special for Unity to help us with in this regard.

If you’re handy with file operations and diffs and perhaps compression (all of which I expect there are libraries available for) I’d have thought that a simple patching system would be pretty straightforward:

  1. At each release build make some form of snapshot of your set of base game files - everything that’s packaged with the game by default but nothing user created or editable (ie: saved games and preferences files).
  2. To create a patch to get from any snapshotted build to another, create a diff between the two sets of files.
  3. Include a tool with your game’s release that applies such a diff to the current set of files. Preferably include some meta info such as a hash of the files before and after the diff so that the tool can check that it’s applying the right patch to the right version and that things went as expected.
  4. To make things easy for your users, have a web server somewhere store the diffs and allow for a simple query to see if a new one is available. If so, prompt the user if they’d like to apply it.

That’s of course a pretty high level overview, but unless I’m missing something that should be all there is to it. But also, I’m pretty sure that there are already general purpose patching systems out there which more or less do the above, or at least help you do 1 through 3, though I’ve no idea how much it’d cost to license an existing one.

I honestly don’t see the point.
There are so many tools out there that are specifically made for patching applications.

And many of them are either free or really cheap.

So, I only have two things to say about this topic.

  1. Do it your bloody self.
  2. If You don’t want to do the above, download a tool to do it for you.
    The guys at Unity shouldn’t have to make a patching tool, just because you are too lazy to look for yourself.
1 Like

This IMO is one of those things were yes it is possible to do without it being built in but they are hacky and one by Unity could be much better(due to access to the engine.)

I wasn’t aware that there were third party patching applications that could work with Unity. I thought once is was compiled, any changes short of having the player download the whole game again would need to be done with the Unity engine. So there are third party applications where you drop two versions of a file in and it makes the patch for you?

It’s hacky? How so? This is important stuff guys.

It is not hacky. In fact, here is one that works very well.
http://www.indigorose.com/products/visual-patch/

It isn’t free, but it does have a free trial.
I have tested it on several Unity projects, and it worked without a problem.
Not to mention the patches are very small.

There is also patch maker, which is cheaper but still works without issues.
http://www.clickteam.com/website/world/patch-maker

1 Like

Yeah I don’t see how engine access would make patching any simpler. You usually don’t patch from inside the game anyway.

What would make things simpler is better AssetBundle support such that it’s easier to automatically pack resources across separate files. At the moment, if you change one asset in your 5GB game and rebuild it, the massive packed asset files can change substantially (because they’re compressed) so a binary-diffing patcher tool might still produce very large patch files. If it were easier to split resources up into separate files, at least you’d have an upper limit on the patch size because worst case you just ship complete replacements for the files that have changed.

1 Like

How would you go about setting this up?

I have made a patcher for my game. It works pretty well… but every small change affects lots of data in the build… i compare the last build with the new one and see that most of the big files are updated even if i have changed only one line of code. which brings the patch size to nearly as one gigabyte…
I dont think unity should handle patching system, but they should take of the files of the build. instead of making them so large, spread them in smaller chunks…
not saying its easy, but would be nice :slight_smile:
And I thought maybe patching only the part of the files that were changed… but its too hard xD if thers another way… please share

I ran into this problem a while back and realised that the best way of tackling this problem is using a binary patcher.
So basically what I do is make binary patches for all files, that way you can change small things and the patches will be very small :).

I was considering releasing my patching tool when it’s done, but we’ll see if I’m happy enough with it to release it, if I am I’ll definitely release it, or at least a library for it. It’s written in C++ so if anyone wants to use it they’ll have to use C++.

I’m pretty sure there are tons of free/commercial tools that do exactly that.

But this simply isn’t the case. Engine access is completely and utterly irrelevant - why would you want to patch it while it’s running? And if it’s not running it’s just data like any other… and this kind of data operation is well known and addressed.

This raises a great point. Something that would be incredibly useful for patching systems is better control over how a game is compressed and/or packaged. I expect that Unity’s content files are currently packed to optimise loading time. If there was an option to pack them to optimise file stability that might be really helpful, though I’ve no idea how feasible that might be.

They can’t even patch their own editor :stuck_out_tongue:

1 Like

Zing.

I used Automatic updating & make patches for your C#, VB.NET, C, C++, apps - wyBuild on other project. It’s a great and cheap tool.
I think it will work on unity, but I’ve never tested it.

Well, IMO this is pretty much the answer:

I haven’t fondled much with patching, but I have tested a couple of solutions and didn’t find them very good.