Fucking C Programmers

author Posted by: whaledawg on date Sep 25th, 2008 | filed Filed under: general

So I’ve been working on my project for about a month now. Maybe 5 weeks. That’s 5 weeks at 40 hours a week, a pretty hard core time investment. And I’ve spent the last week, 20% of it, trying to parse a god damned .OBJ file. Fuck me.

And you might think that after investing this much time in understanding one file format I’d stick with it. I could get my engine to use the same files and just add a few new lines to represent my stuff(physical properties and the like). But writing something to parse this crap once tells me how poorly designed a file format it is.

A good system, game engine, file format, database or whatever, keeps you thinking as high up as possible for as long as possible. That’s why XML is so popular, you define everything by the rules of the shcema. I don’t have to think about the rules, they’re allready defined. That lets me concentrate on my data, the ‘high minded’ part.

With these old file formats I’m constantly thinking about the rules. When can you use a negative index? Is there a default material? Do I have to look at the material before I look at the .OBJ file, and how do I do that if the material file is listed inside the .OBJ. There’s too many valid ways to do the same thing and they involve too many unrelated sections of the file.

And why would they make a file format like that you ask? C programmers. Those mesozoic mother fuckers. See, to guys who wrote programs that parsed FAT12 any ASCII file seems simple.  And if the format updated or added new features they just spent days wading through code to find out where/what needed to be changed. As long as they had a human readable file they were happy to do it.

So now I have to deal with their poor design choices. Fuck me.