About Store Forum Documentation Contact



Post Reply 
distributing updates
Author Message
yvanvds Offline
Member

Post: #1
distributing updates
I wonder how I should best distribute game updates.

The executable is easy, that's a small update.

But now i've added one mesh to my game and it is quite important. The current meshes are all in a data.pak which is 80Mb when compressed with 7zip. Is it necessary to make a new data.pak for my users or is there a way to release a small file and add it to the data.pak?

Regards,

yvan
01-08-2011 01:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: distributing updates
You can check the doc for Pak files. Just Pak your new files into "patch.pak" and in codes call Paks.add patch.Pak after main data pak
01-08-2011 01:57 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: distributing updates
Isnt there a cleaner way that you can merge pak files together?

There is always evil somewhere, you just have to look for it properly.
01-08-2011 02:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: distributing updates
There's no need to merge them together.
01-08-2011 02:31 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #5
RE: distributing updates
So are you adding a new line in the code: Pak.add... if there is small patch available? so when you're 100 patches later you got alot of lines right?... or do i just dont understand how it works?

There is always evil somewhere, you just have to look for it properly.
01-08-2011 02:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #6
RE: distributing updates
I think you could make a patch directory and and load all .pak files that are currently in there?

Or perhaps after one hundred patches, it's time to do a big update? Clean the old patches and install a new pak with everything inside?

Edit: or perhaps you could use the technique from the tutorial advanced/1/files/09 - pak update.

Edit2: The following also works. It looks for patch numbers in ascending order until one is not found.

Code:
for(int nr = 1; ;nr++) {
  Str filename = S + "patch" + nr + ".pak";
  if (!Paks.addTry(filename)) break;
}
(This post was last modified: 01-08-2011 03:32 PM by yvanvds.)
01-08-2011 02:50 PM
Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #7
RE: distributing updates
I would be careful if you just loaded everything from a folder. If you just load everything you may end up loading outdated files after the updated ones. Just make sure you load based on update time or something.
01-08-2011 03:20 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #8
RE: distributing updates
Or ppl can add there own pak files... well that would be a mess pfft

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 01-10-2011 07:06 AM by Dynad.)
01-08-2011 03:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #9
RE: distributing updates
(01-08-2011 03:20 PM)runewake2 Wrote:  I would be careful if you just loaded everything from a folder. If you just load everything you may end up loading outdated files after the updated ones. Just make sure you load based on update time or something.

I think the engine does that automatically. If you have data.pak with model.mesh and add a patch1.pak which contains a newer version of model.mesh using Paks.add, any loading command Mesh::load("model.mesh") will automatically load the latest version.
01-09-2011 02:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #10
RE: distributing updates
(01-09-2011 02:09 AM)Masterxilo Wrote:  I think the engine does that automatically. If you have data.pak with model.mesh and add a patch1.pak which contains a newer version of model.mesh using Paks.add, any loading command Mesh::load("model.mesh") will automatically load the latest version.

I didn't know that. That's nice.

Also people adding their own paks might be a little confusing as Dynad said.
01-09-2011 10:59 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #11
RE: distributing updates
Some people will always try to tinker a bit with a game. Adding paks, assuming they figure out how to do it, won't be that much of a problem. Worst case, they have to install the game anew. But somehow I don't think they would complain about that if they're doing that kind of things.

And if they succeed in changing meshes or sounds, so what? As long as they're having fun, it doesn't really matter, I think.
01-10-2011 12:08 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #12
RE: distributing updates
Isn't it possible to encrypt pak files with a password? You could store a unique password along with the name of the pak for each pak file in a map and, if any pak files fail to be decrypted by their corresponding password, output an error message saying that the data has been tampered with (and possibly even re-download correct pak files if the user is online). This would also allow you to ignore any additional pak files that may have been added by a user.
01-10-2011 12:20 AM
Find all posts by this user Quote this message in a reply
Post Reply