Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / Abolishing C4Groups
- - By Carli [de] Date 2009-04-15 19:52
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.
Parent - By henry [de] Date 2009-04-15 21:21
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...
Parent - - By Sven2 [us] Date 2009-04-15 22:09
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.).
Parent - - By Günther [de] Date 2009-04-15 23:03

> 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.
Reply
Parent - - By Sven2 [us] Date 2009-04-16 01:08
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.
Parent - By Carli [de] Date 2009-04-16 12:35 Edited 2009-04-16 12:39
PhysicsFS sounds great...
i would take this and would call it c5groups
Parent - By Günther [de] Date 2009-04-16 12:59
But not of c4group the tool, c4group as used by the editor, and the functions dealing with the c4group file format. That's a lot of code we can just throw away without writing a replacement.
Reply
Parent - By Caesar [de] Date 2009-04-16 09:51

>Wether that transfers to game load times, I don't know.


I neither know, but I don't tink so, cause I just avoided the .000-Files in the 'exploding' groups. But it would transfer to player saving times, wich were very long on my old HD.
Parent - - By MrBeast [de] Date 2009-04-17 15:17
As far as I know Isilkor wanted to write a new C4Group.
Reply
Parent - By Isilkor Date 2009-04-17 15:18
That is correct, though it's really low on my list of priorities right now.
Reply
Up Topic General / Feedback and Ideas / Abolishing C4Groups

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill