Loading An Array

Started by
12 comments, last by Bezzant 23 years, 2 months ago
i remeber treading recently carmack saying for the upand coming doom3 they want everything to be textfiles

>>Zedzeek : You say that using textfiles saves you coding time. How?<<

eg just yesterday i was working on this (part of a text file)

bolluxname49
{
+SKIN
TEX0 grafix/grounds/flacky_dirt256.tga
TEX1 grafix/grounds/grass_alpha_speckled3.tga
-SKIN
}

now i was having a problem i thought it could of been cause by the second texture so i went

bolluxname49
{
+SKIN
TEX0 grafix/grounds/flacky_dirt256.tga
// TEX1 grafix/grounds/grass_alpha_speckled3.tga
-SKIN
}


ie commented it out (resaved it) and ran the program again and when the textfile got read the parser came to the // and ignored the rest of the line (simple + quick)

try doing that as easily with a binary file.
this is just one example but when you''re developing someit u should try and save as much time as possible , which leaves u with more time working on the real problems


http://members.xoom.com/myBollux
Advertisement
Ok. But didn''t the time required to write the nice text parsing code overshadow the time saved by this example.

Dont get me wrong. I like text files, I really do. But, I know what it like to get a really robust and extensible (That what I really want) tetx parser. I know its hard. I wrong an interpreter for a non-object oriented version of VB last year and it was not trivial to do correctly I can tell you.

Carmack may well want everything in text files? But I guarentee that he wont put everything in text files. E.g the BSP files. I think not.

Anyway, I''m getting off topic. The point is, for a simple example like the grid based map that Bezzant wants, a binary file is the way to go, at least for now.

Pete
>>Carmack may well want everything in text files? But I guarentee that he wont put everything in text files. E.g the BSP files. I think not.<<

why not. text compresses great

(edit just found this its carmack btw)

>> The decisions to integrate all tools (editor and map processing) directly into the executable, and to make map source data required for loading in addition to derived data, make the new game far and away the easiest to create content for. Every installation that can play the game can edit the game.
Also, I have banished the last of the binary file formats, so everything (except standard data files like .wav and .tga) is now in easily explored and understood text files. <<

so it looks like the level format (bsp) will be text , which is logical.
its laziness that creates binary formats for games, im very guilty of this as well

http://members.xoom.com/myBollux

Edited by - zedzeek on February 2, 2001 4:40:47 PM
quote:Original post by Pete Bassett

Ok. But didn''t the time required to write the nice text parsing code overshadow the time saved by this example.


Duh!!!! Have you never heard of the ability to re-use code once it''s written. Obviously not.

This topic is closed to new replies.

Advertisement