
Now, there is the problem:
Spoiler:If the TEXTMAP size is 1,28 MBs about 5%, that means it'll get (+-) 28~30 MBs about 100%!
Now the Math:
MegaWad with 32 Maps x 30 MBs per Map = 960 MBs of TEXTMAPs!?!?!
That is right?

Moderator: Graf Zahl
Spoiler:If the TEXTMAP size is 1,28 MBs about 5%, that means it'll get (+-) 28~30 MBs about 100%!
Code: Select all
<frame time="123454">
<sample channel="left" value="123" />
<sample channel="right" value="123" />
</frame>
You can use a class ID and size for all classes. This two fields are added at the beginning of every record type.Graf Zahl wrote:The reason is extensibility. In a text format you can add an unlimited amount of new properties. A binary format will forever be locked to what it was designed to do at the time it was created.
Code: Select all
struct Foo
{
unsigned int classID;
unsigned int size; //or unsigned long long int if really large objects are needed
//fields of Foo
};
And then, what if you need to enhance a field with an additional, optional parameter, how does CSV fare?milasudril wrote:XML stores the name of each field for each record which is the worst with this file format. If I want to use a text format to store a larger data set I can use csv format, which do not repeat this information, instead.
Gez wrote: Sure, they could have used the same binary structure as the Hexen format, just with 64-bit words instead of 8-bit or 16-bit words. Maybe with a few additional fields as well, such as lineid. Woo. Limits are gone, cool. How would it help?
That is why the all structs should include classID and size. For example: The first version introduces fieldsGez wrote:How would it help? What if a port introduces specials with 12 parameters, instead of just 5?
Code: Select all
int foo;
int bar;
Code: Select all
int foo;
int bar;
int baz;
Use a header that tells what kind of that comes and in what order.Graf Zahl wrote: Any binary format is by definition out of the picture here because by its very nature it's not expandable.
CSV is also useless because there's no direct association between a property and its value. This is clearly saving space at the wrong place.
So, basically, each field needs to be introduced by a text field that tells its name and size. Great! You just introduced the multiple redundancy you wanted to avoid.milasudril wrote:That is why the all structs should include classID and size. For example: The first version introduces fieldsGez wrote:How would it help? What if a port introduces specials with 12 parameters, instead of just 5?Now, the size of this structure is 8 byte. If the new version wants more information the size field just is increased. Perhaps it now looks like this:Code: Select all
int foo; int bar;
and so on. BTW this technique is used frequently in Windows APICode: Select all
int foo; int bar; int baz;
It wouldn't help any for additional, optional parameters. You add a field to something, and you have to reformat entirely all your CSV files before they can use this new field...milasudril wrote:Use a header that tells what kind of that comes and in what order.
Just a reminder: everything that can be optimized should be optimized... The storage format may have a significant impact on load time. Decompress, dynamic string allocation, parse ugh...Graf Zahl wrote:Just a reminder: We no longer live in an age where file size is the most important factor when defining a data format.
No, the description is NOT stored in the file. It is probably found in some .h file. For an example of a file format using this technique look at the bitmap file header. Version 5 is such an extension to version 4, that is such an extension to version 3. The OS2 version differs, yes.Gez wrote: So, basically, each field needs to be introduced by a text field that tells its name and size. Great! You just introduced the multiple redundancy you wanted to avoid.
No, the old one use the old header. The newer file format uses the new header. The header solves the problem. An mathematical analogyGez wrote:It wouldn't help any for additional, optional parameters. You add a field to something, and you have to reformat entirely all your CSV files before they can use this new field...
If there were more than one way to represent the same kind of data, I would have used file format plug-ins. And perhaps I will sink that ship...Anyway, the ship has sailed. The UDMF specs are defined and approved. There's a level editor and several ports that support it, plus various miscellaneous tools, and more coming. If you don't like it, tough luck for you.
And that of course. Just a reminder: The people who designed this format were the ones who have been/are going to be the ones working most closely with the new format and all its implications so you should at leasr assume that they knew what they were doing. Where was your input when it happened? (Not that it'd matter because you'd probably have been laughed at or ridiculed for your ideas.Gez wrote:Anyway, the ship has sailed. The UDMF specs are defined and approved. There's a level editor and several ports that support it, plus various miscellaneous tools, and more coming. If you don't like it, tough luck for you.