Friday, June 29, 2007

To the left we see the precompiled version of tpclient-pywx connected to the modified tpserver-cpp that I have running. The server is running using code that was generated by the RDE. The FroHull component was generated completely from within the RDE with no C++ code written by my own self to get it working aside from a simple call to an initComponents function. A slight modification to the DesignStore in tpserver-cpp allows Components to be referenced by name and makes code generation for these basic elements quite easy.

In the process of getting the generated code to work within the current Minisec ruleset I discovered that to adequately assist the development of rulesets the RDE will need to edit and track a number of other "objects" from within the game, the bare minimum being the design Category attribute.

Another thing that came up was the fact that there is no checking of the TPCL code being done, so when I first generated the code I had a tpcl cost function with a # where a number should have been, which resulted in a (to me) cryptic error during loading the game. I eventually want to validate components and properties, at least on a basic level, in the RDE before code can be generated.

I will probably have to work out a specific coding style to be followed for those wishing to use the RDE to generate their code, but I expected that from the beginning. Right now I'm just happy that the code that I generate works and can be used to generate properties and components by adding only four lines of code. The structure of the generated code will likely change with time, perhaps to make a single function call that will initialize all RDE generated objects so that it becomes trivial to use.

-Fro

1 comment:

mithro said...

That is really cool!

If you want to do validation you should checkout pyscheme. It is what both the libtpclient-py and tpserver-py use to parse TPCL.