Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Basically what I want to do is put a lot of different parameters in a text file I edit by-hand, to avoid recompiling. I'm using Ogre3D, so I'm using configfile, but it gets messed up, and I'm looking for something with more features.

I've tried YAML-CPP, but it seems to be a pain to use, I had a very hard time figuring out how to make a difference between a pair and a mapping.

XML is a no-no, it's not human readable.

My program only reads the file, and I always edit it by hand.

Any C-like format ?

share|improve this question
3  
You'd be better off asking about your yaml-cpp-related confusion on Stack Overflow. Then you can use YAML. –  user744 May 8 '12 at 15:25
3  
XML is perfectly readable by humans. It may be more verbose than some other alternatives, but that it is entirely different criticism. –  Josh Petrie May 8 '12 at 15:41
    
Hm, negative ratings.. figures: "XML - not human readable".. odd statement :|. I also use Ogre and I'd like to understand why the configuration input file "gets messed up". Ogre has a powerful architectural design behind it and I don't think it lacks that much from this point of view. But there's always room for improvement. –  teodron May 8 '12 at 16:17
    
what about C like syntax ? –  jokoon May 8 '12 at 16:23
2  
Go back and recheck YAML - it's pretty common and there are many libraries for accessing it available. Also, C is a language so I'm not sure what a "C-like format" is. –  Tim Holt May 8 '12 at 16:37

1 Answer 1

I use a simple format for many programs, where each line consists of a key,value pair. It's easy for both humans and programs to parse.

#
# this is a comment line
#
keyname,this is the value of the key "keyname"
key2,this is a multi line key called "key2"
,this is the continuation of the previous line
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.