Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 734 times)
0 Members and 1 Guest are viewing this topic.
Offline _Scyth_

Junior Duke





« 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

Thanks,
    _Scyth_
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 https://github.com/threerings/getdown 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 Duke





« 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.
Offline DQQAYME
« 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 opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« 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

JGO Coder


Medals: 17
Projects: 1


hitar!


« 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!]http://www.java-gaming.org/topics/iconified/25690/view.html]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 opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (49 views)
2014-10-17 03:59:02

Norakomi (39 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (35 views)
2014-10-15 16:18:58

TehJavaDev (65 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (55 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!