lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I think it would be nice to provide an editable graph representation
of the content. Unfortunately, this is likely to be written by
oneself, at least I am not aware of a generic grapheditor (but I have
not googled on that... you might do that yourself ;) ).
In my experience, it already helps greatly to be able to visualize
such content - in your case, you could write a converter to generate
graphviz code, a sophisticated visualizer for graphs
If you want to be able to edit your data in a visual manner, you'll
most likely end up writing your own tool, which would be probably more
complicated than the whole RPG dialog system altogether...

If I would be in your place, I would write the visualizer code (for
overview) using graphviz and optimize the testing criteria (for
bughunting). Most importantly, I should be able to *see* which nodes
of your graph have been tested and which have not. Otherwise I would
likely going to forget something. Also, I would write testcase scripts
that automatically check after a run if a dialog has been completely
tested, and if not, a warning is spit out, maybe even a HTML document
of the dialog code, highlighting the untested parts of the code etc.
etc. (thats all fairly simple).
I would expect that for each dialog an individual testcase must be
written which would be as much work as writing the dialog. But I think
that the testcase approach would be more solid than using a visual
editing tool.
What you should avoid at all costs is repeated manual testing - write
scripts instead that cover your dialogs completely instead. Once a
dialog is extended, the testcase must be extended as well... The
testcases should answer arising questions that you have about the
dialog ("is it possible as a dwarf to get the key?" => "here's the
sample code").
Depending on the nature of your dialog system, you might even want to
be able to check the possible edges of your dialog-graph (has each
input edge for a node been tested? Are there input edges that are
impossible?) ... but this depends much on your implementation and your
needs. Also, you might be able to write an automated analyze tool that
is capable to tell you what kind of minimum requirements must be met
to get through the dialog at all or to get to certain nodes. Another
approach could be that you flag your nodes in your dialog system - for
example you could specify in the dialog itself that a node must be
reachable for a number of conditions and these are checked
automatically if it's possible.

Well, all in all: Don't rely on visualizing for testing. You might
improve your bug ratio, but that heavily depends on the author's
discipline and awareness, and honestly, Humans suck at these things
(not so do machines ;)).

It would help btw. to provide concrete examples if you would add a
simple dialog to this issue ;)

Cheers & Merry Christmas,