Quote:Original post by overeasy
should my xml map parser be in lua or c++?
If you're going to have Lua, don't even bother with XML.
Lua was actually designed partially as a data description language, and is very nice for this purpose. I would go so far as to say that Lua is superior to XML for non-document data.
Just as an example of how to do this, consider a map for a text adventure type game:
In XML:
<map name = "twistymaze"> <room> <description>you are in a maze of twisty little passages, all alike.</description> </room> <room> <description>you are in a twisty little maze of passages, all alike.</description> </room></map>
In Lua:
twistymaze = map{ room{description = "you are in a maze of twisty little passages, all alike."}, room{description = "you are in a twisty little maze of passages, all alike."}}
The Idea is that you make your data file as a lua program that constructs whatever data you need as tables and so on. Note that 'map' and 'room' are functions that might do some processing on the tables they are given, like error checking, etc.
The book 'Programming In Lua' is a good read, and will give you more info on this idea. The old one is available on-line free, the new one you can buy (They arent much different, only buy if serious).