Wouldn’t it be better to compress all the asset by single category instead of making a huge asset holder. The goal would be to simplify the usage of an auto updater.
I made an auto updater with FTPS and i scan any file on the server and compare them with the file in the client PC. if they mismatch in size and date I re-download the whole thing.
What i came across is the Asset folder is a single zip and require a whole re-download every time.
I was wondering wouldn’t it be faster and better to separate every addition asset as zip file instead of integrating them directly into the Assets Folder?
well… what about instead of doing that, just have the asset.jar with every thing, and on updates generate a new asset-someashcode.jar that would contain only the new assets?
I guess this can be done in the build by checking the last git commit of the file.
This way you would download only the new stuff.
Yea this was the first thing i had in mind. But i was wondering why jmonkey doesn’t do this by default.
Since if i change a main asset in the base game, i will still need to update a whole 5go (example) instead of a smaller zip file. Else i will have to leave the unused asset inside the player PC until a major update.
But i do understand that not everyone would benefice of the multiple zip. Anyway i will probably do Normen or The other method and leave it like this.
So if you want a really professional solution use something like bsdiff and a clever logic when it’s easier to redownload and when to Patch (e.g. An update from 1.0 to 1.9 might redownload instead of patching 1.1 to 1.2 to 1.3, …
I was thinking about doing some open source project for that but my game is in a way to early stage.
My system already download only the modified files, the only thing that make it bad is the Asset file since this is one of the most modified file in a game and the biggest one.
Right now i scan for any file difference from the server and i re-download mismatching files(Date,size,etc). It s fast and reliable for now. I can update any missing file in a second from my side for everyone(only need to kick people from the server and game first)
Well the idea here is that you only store the Byte differences much like a git commit or diff file.
But then your previous System doesnt work anymore since you always have to Base your changes on some revision