sexta-feira, 25 de setembro de 2009

Xml-style game loading

How are you gentlemen

After continuing the process of adding features to the Engine in order to allow the building and playing of a basic Pong game, i came to the point where i wanted to have the whole thing loaded from an external xml file.
So i've spent the past 2-3 weeks designing a way to parse xml files and load the appropriate objects into the game, which has been quite a challenge because

1. writing xml file parsers is kinda boring
2. took a bit of code refactoring (to allow incremental construction of an Object - define an empty game entity and add modules to it as they are read from the file)
3. adding the feature to inherit properties from an object (kinda like inheritance in object oriented design)

So after testing loading a few basic entities from the xml format and playing with configuring them in different ways from the xml file, i'm now beginning to add all the available tags to fully allow the definition of the game in xml format. More uncreative and repetitive code, but necessary to have great big fun with it later :)