CFG/INI Format

This is a discussion on CFG/INI Format within the Game Programming forums, part of the General Programming Boards category; As an example, say I want to save a player's profile name in one of these types of files. Is ...

  1. #1
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719

    CFG/INI Format

    As an example, say I want to save a player's profile name in one of these types of files. Is their an advantage of one to the other? Do these formats have specific formatting of the text inside to work properly, or can anything be saved, regardless of a specific syntax? I've seen this kind of stuff in .ini files:
    Code:
    [Player.Profile]
     PlayerName="Name"
    Does it even matter what format the text is arranged? Or is it just for organization?
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  2. #2
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    Posts
    594
    It's for organization. If it's awkward to use, it's worthless. If you seen a .ini file for any program or game, its usually a bunch of "this=that" kinda stuff.

  3. #3
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    So it's the way you parse the file? I've seen INI parsers that follow the
    Code:
    [section] 
    var1=blah
    Is their an INI file format standards, that tells you how an INI file should be parsed?
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    On windows you have several functions to parse ini-files like
    GetPrivateProfileInt
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  6. #6
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    I see now. Anyone have any good C++ INI file parsers? I was using IniFile.h and IniFile.cpp, but there isn't much documentation.

    I figured it out.
    Last edited by Sentral; 12-23-2006 at 03:18 PM.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 03:27 PM
  2. function returning hour in either 12 or 24 hour format
    By stanlvw in forum C Programming
    Replies: 4
    Last Post: 01-01-2008, 05:02 AM
  3. Compression/Decompression Wave File and MP3
    By cindy_16051988 in forum Projects and Job Recruitment
    Replies: 51
    Last Post: 04-29-2006, 06:25 AM
  4. Seeking Format Advice
    By PsychoBrat in forum Game Programming
    Replies: 3
    Last Post: 10-05-2005, 05:41 AM
  5. Can't Format C
    By caroundw5h in forum Tech Board
    Replies: 40
    Last Post: 04-26-2004, 09:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21