Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  automatic updates/patches ... how?  (Read 3085 times)
0 Members and 1 Guest are viewing this topic.
Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Posted 2002-11-25 17:41:19 »

Can anyone give me a start point for how to either find or write an automatic patcher for an online game?

Specifically there are three things that need to be addressed: code changes or additions in my "client.jar" or "common.jar" jar files, resource changes in one of several .jar files that hold image resources, and resources that are not included in those jars but are in a resource directory structure, for size and loading speed reasons.

All I really want to do is find if there is a new update available, and if there is, download, and possibly update, existing files.  Yes, it is to be a forced update.

Any thoughts?  Muchly appreciated.

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline markuskidd

Junior Member


Medals: 1



« Reply #1 - Posted 2002-11-25 17:57:59 »

It depends on the specific security needs. For my client, having an older version is harmless (often it won't work anyway) so what I do is this:

For each jar I want to have updatable, I give it a version field in the manifest of the jar file. When the client is started, I have it download a versions file which consists strictly of version numbers for the jar files as floats. If there is a newer version, I download the new jar from the server and overwrite the older one. Then I call System.exit(0) after telling the user they will need to restart the client for the changes to take effect.

If you need more security, I'm probably not the person to ask.
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #2 - Posted 2002-11-25 20:29:46 »

For the jars - use WebStart. Does exactly what you need. We do it for code and resource jars.

For resources - hm - you could use 'tagging' jars that describe what resources have to updated and again exploit webstart installation (jars run first time only when config changed).

I somewhere have a link to a utility lib that allow to address single files from a server via JNLP. I think I have it at work and can provide it tomorrow.

Or simply put the resouces to be update into a jar and let a webstart installer deflate them on the target machine.

Hach, so many ways - life is so beautyful with WebStart (don't tell C++ world we have it, I think they do it by hand comparing file dates and such ...)

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #3 - Posted 2002-11-27 06:04:43 »

Only issues with Webstart that I'm not sure about is that a) I'm using InstallAnywhere Now! and b) doesn't Webstart cache things?  As in there is no definite application install directory?

Yes, this is an app and not an applet.

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #4 - Posted 2002-11-27 07:03:06 »

Quote
b) doesn't Webstart cache things?  As in there is no definite application install directory?


Yes, sure, WebStart caches things. That's it's main task. From my point of view I'm not interested in WHERE things are installed. We maintain a 10MB jar application with this easily.
Additionally, WebStarted apps can very well install custom data to custom directories.

For resources - I put them into jars and add a simple class to it that provides me with the resp. URL to the data. That  very convenient and makes completely independent of the place things are stored. No directories in my code!


Here is the link I promised:

http://rachel.sourceforge.net/

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #5 - Posted 2002-11-27 07:50:44 »

Maybe take a look at the JCanyon demo?


http://java.sun.com/j2se/1.4/demos.html

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
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.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!