vJass, Zinc, ASL and Die Macht des Feuers

As you can read in the JassHelper thread on Wc3C.net JassHelper doesn’t only support vJass anymore. Zinc is the name of a second C-like scripting language which is in my opinion the better one if you’re new to JassHelper.

Unfortunately when first ASL code was written Zinc didn’t exist yet, so I had no real choice between two different kinds of syntax (though I would have been able to create my own precompiler if I had had a little bit more knowledge about programming).
In addition to the new Zinc support vJass become some really important improvements.
It’s now possible to use static or even non-static methods as function interface functions.
The missing of this feature did always make me to use additional functions in the struct libraries which called temporary static methods of the struct or to use some other public methods which usually shouldn’t be public.
The second big feature (which was actually introduced before the first one) is the new possible usage of static ifs. Static ifs are a kind of preprocessor ifs which expect constant boolean values.
This helps the user to prevent some code in non-debug mode or to let users of his code configure some settings.
The ASL now uses some global constant boolean variables for configuration.
Some days after the introduction of this feature Vexorian added the default global variable DEBUG_MODE which is true when debug mode is enabled.
Unfortunately I was not able to prevent unnecessary code imports by using static if statements since static ifs are always checked AFTER the import phase (just read these two posts from the JassHelper thread for getting more information about static if, memory exhausted bug and bug tracker discussion: 1, 2).
Since some libraries and text macros may not be created if some static ifs evaluate false Vexorian added optional requirements and text macro calls which should always be used when calling text macro A_STRUCT_DEBUG from the ASL.
Additionally to my work on ASL I’ve spent a lot of time improving code, talks and quests of my RPG project “Die Macht des Feuers”.
I rewrote the whole NPC routine system of the ASL which is one of the “world sub systems” for implementing better and less complicated routines in “Die Macht des Feuers”.
ARoutine itself is an abstract routine type now which can be added to one or more units (NPCs) by using the struct ARoutineUnitData.
When I wrote the code I was more geared to Gothic 2’s routine system than before.
Finally all routine types which are used in the map “Talras” will be accessible by other “Die Macht des Feuers” maps, too (like class spells, core game systems and item types).
Note that I probably won’t rewrite the whole vJass ASL and “Die Macht des Feuers” code to Zinc code although I prefer the Zinc syntax because it would be a huge amount of work.
Btw. I am improving vjassdoc since it has to “understand” the new vJass syntax additions but it probably won’t support Zinc, too (for the same reason as described above).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: