C4Groups is an old format which makes a folder to a unique file which can be transported by net. But it's slow and does not compress very well.
I suggest to use ordinary folders to store object packs and szenarios and to use an gzip-compression for networking or a special file transfer protocol.
I suggest to use ordinary folders to store object packs and szenarios and to use an gzip-compression for networking or a special file transfer protocol.
That will shorten loading times. :)
But the data can be modified by mistake, so the checksum changes and netplay won't work correctly. :/
Hm, OpenClonk should use "file filters" for checksum generation...
But the data can be modified by mistake, so the checksum changes and netplay won't work correctly. :/
Hm, OpenClonk should use "file filters" for checksum generation...
C4Group uses zlib, which is DEFLATE, which is essentially the same as gzip. The slowdown is because the current format does not allow random access. The group file format may be changed to allow random access either by changing our format or by switching to a completely different format like zip. In order to do that, someone would have to rewrite C4Group though, which would be a lot of work, even if it's just an interface to another compression format.
Using folders for normal data storage is not really an option, imo, because loading times are painfully slow on regular hard drives (yes, using compressed files is faster than having unpacked folders) and generally more inconvenient to handle for players (think of exchanging objects, scenarios, etc.).
Using folders for normal data storage is not really an option, imo, because loading times are painfully slow on regular hard drives (yes, using compressed files is faster than having unpacked folders) and generally more inconvenient to handle for players (think of exchanging objects, scenarios, etc.).
> The slowdown is because the current format does not allow random access.
In most cases, the sort order is painfully arranged to match the load order, so at least slow game startup is caused by something else. Someone claimed that their rewritten c4group was faster than the original for pack/unpack. Wether that transfers to game load times, I don't know. C4Group is quite convoluted :-(
And we don't really need to rewrite C4Group. If we switch to some standard format, we can loose those file management routines and only need a simple way to load and save some files, for which there are existing libraries like physfs.
That's still either a rewrite of C4Group (as an interface to physfs) or even more work if every call to C4Group should be replaced by calls to physfs.
PhysicsFS sounds great...
i would take this and would call it c5groups
i would take this and would call it c5groups
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill