Config files

The next step (apart from bug-fixing), is to add better support for config files. More specifically, to allow the game to load in config file data, modify it according to menu options and resave the file to disk (while keeping the easily understandable text names).

Unfortunately, PTK does not have any ability to change config file data, or a save config file function. To make it worse, the text data is stored as a private type of data in the IniReader class.

So, I’ve had to write my own versions of the config file functions, which means I can now change a variable within the text data and then re-save the file (even if the variable data changes in length of characters). This also lets me put better space detecting in the config file routines, instead of trying to work around them by stripping out spaces before passing to PTK (hence the underscores in some of the config files instead of spaces).

I like PTK, and I’ve suggested a few changes and bug fixes over the last few months, but progress on those being implemented by the author are slow unfortunately..

Anyway, now that I can properly integrate text file variables I can start to put in proper menus to allow the player to change game settings either via a text file or ingame. I’m still debating the format of how the options should be stored and displayed in various menus..

6 Responses to “Config files”

  1. Mike Says:

    I just want to say a big “THANK YOU!” for all the work you have put into this so far. 🙂

  2. happymonster Says:

    Thanks a lot! 🙂

  3. Kreezer Says:

    I’ll second that.

    He are a true Chaos Master !

  4. Kreezer Says:

    (That should have been – He is a true Chaos Master..)

  5. Mike Says:

    Is there a way you can implement team play somewhere down the road?

  6. happymonster Says:

    Thanks Kreezer!

    Mike: That’s something I would like to do. Of course it would have helped if I had planned for that from the beginning with a proper design. But still, I’m terrible at writing design documents and not much of a design kind of programmer. 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: