Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

While developing an engine for text-adventures I'm still unsure how to expose the API it provides to the developers/writers. My two concepts for now are:

  1. Running a small JS engine which executes JS script files (in comparison to a full DSL) where devs/writers can access a well-defined subset of functions and classes.
  2. Parsing XML files which define levels, objects, entities, ... so that no real programming knowledge is necessary if the devs/writers stick to the conventions concerning the structure of these files.

Which of these approaches (or even other ones I haven't thought about yet) is more likely to be recommended?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I would recommend XML, XML with XSLT support or YAML.

1) XML is good because of two main reasons: it's human readable format, which anyone can understand and use with minimal training and knowledge, and it's very easy to parse, support and extend, you probably already know that.

2) YAML just like XML is again human readable format, but also offers concise code, I guess they are alike in this matter.

http://www.yaml.org/

3) XML+XSLT is an ideal for me, because XSLT is actually touring complete language, so people can not only define leves and structures, but also implement some logic, for example randomly generating village with loops. But this option will require additional work on a client, and might create some head-ache if you haven't worked with XSLT before.

http://c2.com/cgi/wiki?XsltLanguage

share|improve this answer
    
Could you possibly elaborate on or provide some further resources fpr XML+XSLT? I am coding in C# so I have enough tools though I can not imagine how to combine these and use XSLT. –  Christian Ivicevic Jul 13 '12 at 7:03
    
@ChristianIvicevic there is number of tutorials on XSL, here is one that seems quite interesting since it explains both transformations and merges (of multiple XML) files with XSL: docs.oracle.com/cd/B19306_01/appdev.102/b14252/adx_j_xslt.htm –  David Sergey Jul 13 '12 at 14:30

I would go for parsing XML or YAML files with a clear and easily accessible documentation. This way the people who work with them never have to touch real code they might completely screw up.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.