Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  What is the best practice for updating a game?  (Read 2601 times)
0 Members and 1 Guest are viewing this topic.
Offline _Scyth_

Junior Devvie

« Posted 2013-09-25 15:15:29 »

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 Smiley

Offline Troncoso

JGO Coder

Medals: 20

« Reply #1 - Posted 2013-09-25 15:45:51 »

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.
Offline xsvenson
« Reply #2 - Posted 2013-09-25 15:48:43 »

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 and I bet there are more options.

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline _Scyth_

Junior Devvie

« Reply #3 - Posted 2013-09-25 16:56:15 »

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
Offline Troncoso

JGO Coder

Medals: 20

« Reply #4 - Posted 2013-09-25 17:07:39 »

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.

Junior Devvie

Medals: 1
Projects: 1

« Reply #5 - Posted 2013-09-25 18:00:48 »

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 =)).

Offline Opiop
« Reply #6 - Posted 2013-09-25 19:52:05 »

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.
Offline elamre
« Reply #7 - Posted 2013-09-25 19:59:22 »

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

My projects:
Tower Defence!]]Tower Defence! [lll.......] 30%!
Lightsnakerider! [llllll....] 60%!
Offline Cero
« Reply #8 - Posted 2013-09-26 01:06:07 »

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

Offline Opiop
« Reply #9 - Posted 2013-09-26 03:16:22 »

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.
Pages: [1]
  ignore  |  Print  

DesertCoockie (36 views)
2018-05-13 18:23:11

nelsongames (80 views)
2018-04-24 18:15:36

nelsongames (73 views)
2018-04-24 18:14:32

ivj94 (755 views)
2018-03-24 14:47:39

ivj94 (85 views)
2018-03-24 14:46:31

ivj94 (626 views)
2018-03-24 14:43:53

Solater (101 views)
2018-03-17 05:04:08

nelsongames (182 views)
2018-03-05 17:56:34

Gornova (408 views)
2018-03-02 22:15:33

buddyBro (1068 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!