|
|
View previous topic - View next topic |
Author |
Message |
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Wed Sep 12, 2007 12:38 pm Post subject: How to find out when to download updates from game server? |
[quote] |
|
Heya,
mu_ds suggested that I should make my game in a way that the client always updates itself from the server on start. I like this suggestion very much. I now have an idea how to implement the download facility, but I face a new question which puzzles me:
I don't know how to let the client/server find out which files need updating.
I imagined a few solutions, each seemed to have problems:
1) File timestamps. If I install the server newly, all files get new timestamps = all files will be downloaded even if not modified. Not so good.
2) File hashsums. Client reads a file, computes a hashsum, send sum to server to compare, and if sums differ, client downloads new file. Not 100% safe, files can differ and still have the same hashsum and it means to read a lot of data on each start to calculate the sums. Not really to my taste.
3) File versions. Client has a list of file versions, server has one. Client compares it's list to server list on startup, downloads new files from server. This seems to be better than the former two, but requires to manually maintain the list on the server, and there is a chance that the clients list gets corrupted.
Are there better solutions? I think my game will undergo many changes, sometimes daily, and I'm too lazy to package new versions all the time. I'd really like if I only need to throw new files into my server installation and the clients fetch them on the next start.
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Wed Sep 12, 2007 1:02 pm Post subject: |
[quote] |
|
Not every file should have a version number. You should have complete updates that change the client number. Make a utility that takes one file (zip or your own pack file) and updates all the files that it contains. There's a small chance the client version will get corrupted if you keep it in an essential game data file (binary).
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Thu Sep 13, 2007 3:11 pm Post subject: |
[quote] |
|
Lazy as I am, I had hope to have a file store on the server, and if I have improved some images, or added a new item, I'd replace the file in the store with the new one, and on the next login clients would fetch that file. I hoped to get around packaging and versioning updates.
I'd like to have this before I rent a server, so that from the point when the game is online, I can put updates online very quickly. Although most often it would mean all testers/players must restart their clients in case of an update - depending on what got updated.
I'm still uncertain hoo to detect that a file changed in the file store (timestamps should do, I assume) and from those changes deduce version numbers to compare with the versions of the files on client side. Overall this looks tricky, and tricky usually means unreliable >.<
|
|
Back to top |
|
|
MDS-MU Monkey-Butler
Joined: 24 Oct 2006 Posts: 52 Location: sto dgo, DR.
|
Posted: Thu Sep 13, 2007 6:02 pm Post subject: |
[quote] |
|
Hajo wrote: | Lazy as I am, I had hope to have a file store on the server, and if I have improved some images, or added a new item, I'd replace the file in the store with the new one, and on the next login clients would fetch that file. I hoped to get around packaging and versioning updates.
I'd like to have this before I rent a server, so that from the point when the game is online, I can put updates online very quickly. Although most often it would mean all testers/players must restart their clients in case of an update - depending on what got updated.
I'm still uncertain hoo to detect that a file changed in the file store (timestamps should do, I assume) and from those changes deduce version numbers to compare with the versions of the files on client side. Overall this looks tricky, and tricky usually means unreliable >.< |
i have the system already made if you want it add me in msn: mu_ds@hotmail.com ..what i do is quite easy to underestand.. but I DON'T update every file!
i force the client to download the latest version(a zip package) by opening a browser and a link with the client..actually what i do is to have an update file(that i dl from the web) that stores different stuff like the client version, possible download links..main server url or ip..local ip in case its the same host and more..
i don't auto install or update each file..unrealiable and messy to me... i do the same as say msn all or nothing and only allow the latest version..easier to prevent hax0rs :P
|
|
Back to top |
|
|
|
Page 1 of 1 |
All times are GMT
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|