I guess I’m going forward with being a game developer after all, despite myself. So, I guess at some point I’m going to need to do updates and patching, but the only problem is I have no idea how it even works.
I’ve seen 4 pages of discussion on way less important subjects, so I was hoping that somebody would get into the lecture spirit and give me a quick overview?
I assume you are you looking to update game without requiring users to download whole game. I think it is worth looking into Asset Bundles and Scriptable object saves as assets.
Doing a binary diff is difficult, and I wouldn’t reccomend it. If the binary needs to be changed, you might as well have the user redownload the whole thing.
So that leads to the next step. Make the binary as small as possible. Do this by moving out assets into asset bundles. If you group assets sensibly, you can patch one bundle at a time. Which will massively save on bandwidth.
The other important area you’ll want to patch is the game data. You’ll want to be able to tweak the levels or the power ratings of creeps or whatever. So make the level data a seperate file of it’s own that you can read at runtime.
In general the more you break your game into multiple files, the easier it will be to replace files one at a time.
As to the actual patching process, have a version number for each file. Each time your game runs, check your server for the latest version number. If the version number changes, download the new file.
Is this implicit confirmation that this is the game you’re remaking? I saw the model in your WIP thread, but wasn’t sure if that was just a generic idea or what you planned to make.
I don’t know if things change just because of Unity but in general with software applications (and actually most of the AAA games that I do play) when you launch the game one of two things happen… either (1) the game first checks for an update out there online someplace… if found it then launches an updater and exits (the game exits I mean). The updater then performs the update process and in turn then launches the game and the updater exits OR (2) when you think you are launching the game you are in fact actually launching a tiny program that looks for an update being available… if none is available it simply launches the game and exits. If one is available it downloads it, applies it then launches the game.
I’d think Unity or not the process should be the same.
I don’t know how it is for mobile platforms, but if your launching on desktop, you probably don’t have to worry about it much. Before I released my game I was worried about this as well, since Unity spits out all new files whenever you build. Turns out I worried for nothing, because Unity builder is pretty good about keeping most of the files the same. If you plan on releasing for Steam, Steam client automatically compares current files on disk and only downloads what it needs. The Steam developer back end tools are quite good, when you upload a new build, you’re able to preview the size of the update for your users. I don’t have any sort of patching tool and don’t worry about splitting up my game into asset bundles, and my updates are seldom over 20 mbs. Steam is good enough that you can get away without a custom-built patching system in most cases.
If you want to get a feel for it before you make it to steam, Itch.io supports automatic binary diffs through their commandline tool butler and it works really well, recommend you try out butler if you use itch since you can have it binary diff and upload all your files from one batch file, really good if you have bad internet and dont want to wait for each one to finish so you can start the next
Kind of, yes. They will only download what is different in the final built game, however especially with compression/packing that isn’t quite as simple as what is different in the source. But in the end of the day they will generally download much less