Merry Christmas,
St. Nick will be here any minute, and I'm focusing on file streams.
Progress hit a hiatus when I stumbled upon a problem in my XML reader. I tried so many variations and debugging. Quite frustrating, still haven't figured out why I couldn't read the XML file.
Anyway, after sleeping on it I realized that even XML was overkill for the needs of kyuplex, and decided to write my own simple parser.
I've modeled my save files after id's Quake config files, which look like this:
So simple, right? If it's good enough for Quake it's right for kyuplex!
Besides, Quake is the engine I'm most familiar with. I might take a peek at the source and grab some relevant bits from id's parser : ]
Also I should go back and re-read those early chapters of Stroustrup's "Programming Principles and Practice" IIRC it was chapter 6 that had an excellent section on writing a calculator program that parsed input using token streams.
Low level iostreams, exciting stuff!
No comments:
Post a Comment