Members - Reputation: 130
Posted 08 December 2012 - 12:35 PM
In preparation for a game I'm making that has quite a large dialogue/visual novel portion to it, I've decided that I needed a way for non-programmers(writers, artist and authors) to manipulate screen elements and create scenes and dialogue without having to learn a high-level coding language like C++ or Java. This has led me to begin designing a scripting language to fit the needs of those authors and writers.
However, roaming around on the internet, I've heard of XML and how it is said to shorten the time spent making text parsers and custom scripting languages.I am interested in adapting XML for my project, but there is an important question that I have: Since my goal is to allow a non-programmer with no prior knowledge of programming or scripting languages to write his or her dialogue and scenes in a text file, would XML be too complicated or difficult for them to work with? How complicated would the syntax the author has to learn be?
If anyone with experience with using XML in C++ could answer these, it would be greatly appeciated. Thanks.
Crossbones+ - Reputation: 3750
Posted 08 December 2012 - 01:03 PM
What you probably should do is use the fact that XML is such a well-defined and widely adopted standard to your advantage. There are tons of libraries which can easily read and write XML files, so it might be a good idea to invest a small amount time in writing tools for these people that give them an easy interface to work with, and which write out the content they make to XML files.
This gives you nice intermediate files which are still more or less readable and which can also be easily read back into your game.
I gets all your texture budgets!
Crossbones+ - Reputation: 1416
Posted 11 December 2012 - 01:30 PM
In this case, you want to expose a domain specific language to users, so you'll have to parse that language anyway. When you have the data in hand after parsing, why would you want to convert it to XML? That seems superfluous.
Some pros/cons/alternatives of XML to represent stuff: