What is the best practice for updating a game?

If I was to create a game, and release a version of it, but I feel I could bring more to the game. Therefore I’d update it with new additions etc, however, I would like to know if there was a way of writing my main game code, so that updates could be easily added, almost as if they are plugins. That way they could be easily managed, and if the user doesn’t want the update they could simply turn it off.
Anyone have any advise for me? Or if you have a better method please post it :slight_smile:

Thanks,
Scyth

I would think it’d be as simple as replacing/adding the Java class files in the jar. Or, when the player updates, just find the jar and replace the whole thing.

The updater (that you see with some games like MMO’s) would be a separate application, so that the actual game isn’t open while you are updating files. There are probably some tutorials on launchers/updates, and maybe even some threads on here.

There are different options:
Full package - Delivering the full installation package on every change.

  • Pros: Easy enough, complete experience. Every new release is independent from the previous or the next one.
  • Cons: 1 small file change in what is a 5GB install ?.

Patches - Delivering partial installations that modify the parts that were really changed.

  • Pros:Smaller delivering packages
  • Cons: Patches are essentially diffs of 2 versions. Easy enough from version 1-> 2. How about from 4.25.6 to 5.12.3 ?
  • Neutral: Possible a hybrid solution with the first one. Full packages on full releases, patches on the middle.

Launcher and per file update) - Having a launcher application that manages per file updates.

  • Pros: Very flexible, You get only the files that have really changed. Upgrading from version old.x to the bleeding.edge.y is not a problem
  • Neutral con: The launcher itself. It’s not directly a con per se, but You need to manage another application. But You can always use a 3rd party option

Of course a separate launcher doesn’t mean You can’t do a full package or patched versions with it.
Examples of launchers: of course Steam and Desura and the the well known Minecraft launcher. They all have some kind of “per file diff check”. I might be wrong but I think Steam even doesn’t send full files but really only the diffs of 2 versions.

There was a open source or just free option for that kind of launcher/updater. Like for example https://github.com/threerings/getdown and I bet there are more options.

A launcher is out of the question as it is to be deployed on a mobile device, however for desktop games I certainly see the usage of it.

The patches doesnt sound like a bad idea, but it would mean needing to code networking into the game or even just the titlescreen to check whether a new patch needs to be downloaded, and then it would download it, however i have a feeling that i’m left with just the full installation.

With that in mind, i’ll just need to try my best to keep file sizes down, because when its on a mobile, i dont think someone is prepared to what however long it takes for their carrier internet service to download a GB worth of game files

Thanks everyone

Mobile games aren’t generally over a GB anyway. If it’s for smart phones, the Android Play Store and iOS App store both have utilities for updating your programs. They probably make it quite simple to do so.

In any case best solution full code Jar redownload.
Resource part can be download separate or update part of it.

For PC I think better solution Separate Jar launcher that check Game and redownload it.
For Mobile its in game Web check for update on site and link to redownload game.
In any case resource must be separate from Code (exceptions resource low size =)).

No thats honestly the worst way, because it you have a huge game, you’ll have to redownload it everytime, and that could be gigabytes of data. If it were me, I’d go with patches as they’re small and easy to manage.

That would be the case if you have gigabytes of code. Which is highly unlikely.

Yeah my jars have only code, no assets. Those are separate.

But here is the interesting question: how to update something installed to program files on windows? You need administrator rights

Another reason why just switching some files is better. I don’t see the point in redownloading a game completely when you can just change the files that have been modified. Version control, shouldn’t be a huge deal, just make a system that you like.