Configuration file 3D RAS

Post anything on anything here

Moderator: Moderators

What format do you prefer ?

YAML
3
27%
S-Exp
1
9%
XML
5
45%
JSON
1
9%
Other (please specify)
1
9%
 
Total votes : 11

Configuration file 3D RAS

Postby Qantourisc » Wed Jan 16, 2008 9:20 pm

Hello.
For those that know i'm making a Sound Engine.
But, I need to add a configuration file where the user can set there preferences.
So I was wondering what style would be preferred: (Ignore the content of the format, but look at the syntax in witch the data is represented)
(if unsure DON'T vote please)
Example of YAML
Example of S-exp
Example of XML
Example of JSON
This is the dataset i need to store
Code: Select all
{Setup1 %
     Headphones {
          headsize=12cm;
          headtype=a;
     }
}
{ Setup2 %
       Speakers {
            Count 4
             Speaker 1 {
                     5 degree; 50cm
              }
         }
}
Last edited by Qantourisc on Wed Jan 16, 2008 10:25 pm, edited 1 time in total.
Qantourisc
Alien
 
Posts: 130
Joined: Fri Jun 16, 2006 5:44 am

Postby kyre » Wed Jan 16, 2008 9:44 pm

Plain INI file type syntax perhaps? What more than key/value pairs do you need?
Whenever You go, then You aren't.
kyre
Alien
 
Posts: 118
Joined: Tue Jun 13, 2006 8:56 pm
Location: Sweden

Postby Qantourisc » Wed Jan 16, 2008 10:23 pm

kyre's suggestions:
Code: Select all
Setup1:
  Headphones:
    headsize=12cm
    headtype=a
Setup2:
  Speakers:
Code: Select all
Setup1 = {
  Headphone = {
     headsize=12cm;
     headtype=a;
  };
};
Qantourisc
Alien
 
Posts: 130
Joined: Fri Jun 16, 2006 5:44 am

Postby [-z-] » Wed Jan 16, 2008 10:32 pm

So are you going with ini?
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Qantourisc » Wed Jan 16, 2008 10:37 pm

Open for discussion :)
Qantourisc
Alien
 
Posts: 130
Joined: Fri Jun 16, 2006 5:44 am

Postby Ed » Wed Jan 16, 2008 10:51 pm

I'm for XML in this regard just because there are so many tools for handling XML. Any modern program language has modules for handling XML which will allow the configuration to be handled by just about anything.
Ed
Forum addon
 
Posts: 1172
Joined: Wed Mar 01, 2006 12:32 am
Location: UK

Postby Qantourisc » Thu Jan 17, 2008 8:01 am

Ed wrote:...because there are so many tools for handling XML.
What if peaple don't desire to use any of these ?
Qantourisc
Alien
 
Posts: 130
Joined: Fri Jun 16, 2006 5:44 am

Postby divVerent » Thu Jan 17, 2008 9:19 am

Yes, XML may be nice to parse, but is awful for users to edit.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Morphed » Thu Jan 17, 2008 12:40 pm

i vote for INI too, but i hope we will never need to edit it anyway :)
Morphed
Alien
 
Posts: 197
Joined: Tue Feb 28, 2006 10:41 pm
Location: Poland

Postby Qantourisc » Thu Jan 17, 2008 12:42 pm

Morphed wrote:i vote for INI too, but i hope we will never need to edit it anyway :)
For now yes ... later you should get a GUI for it ...
Qantourisc
Alien
 
Posts: 130
Joined: Fri Jun 16, 2006 5:44 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron