The "properties" file format I used for Tiny Parallel Worlds was enough for the 48-hour game competition, but for the sequel I need to be able to do more.
I've come up with a (probably un-original) file format which is basically a heirachical properties file, using indentation for relationships. I call it...
TOML
(Tom's Ordinary Markup Language)
Here'se a taste:
house
window
width=100
height=90
door
colour=green
handle
material=metal
roof
colour=red
chimney
So far I have a Parser to read it, and a Transformer to transform the nodes back into a file. The last step is to write some sort of Evaluator to evaluate certain expressions (similar to XML's XPath).
Because of the simple nature of this format, its easy to code myself, and really easy to read.
Why not XML?
XML has a header, nodes, attributes, namespaces, and text all in between. It's full of garbage slashes, quotations, and especially end tags. I don't need those things, so I'm doing my own thing
Why not YAML?
To be honest, i thought it was the solution to all of my problems, but after reading up on it, it seems to have similar issues as XML... I just want plain old nodes, with a key and possibly a value
So now that the file format is almost out of the way, next up is loading a level from it!






