|
Table of Contents
May 28DocumentationHi All, With L3DT release 2.9 just around the corner, and the number of bugs found in the beta release mercifully few, I’m taking some time to update the user guide and other documentation. Fortunately, release 2.9 does not change much of the familiar user interfaces in L3DT, so not many existing pages will be changed. However, the new release does add several new interfaces (e.g. mask generators), and greatly expand on others (ZeoGraph, ZeoScript, etc.) Thus, there are a lot of new pages to add. Documenting the new customisation features (graphs, scripts, plugins, etc.) is proving particularly time-consuming, as there are approximately one bazillion different functions or filters to describe. I have finally finished documenting the plugin API functions (after three and a half years!), but still have many ZeoGraph filters and ZeoScript functions to document. Once these reference pages are complete, I’ll move on to writing the tutorials. Fun fun. But that’s enough jibber jabber; I’ve got documentation to write! Best regards, Aaron. April 27Windows 7 compatibility, continuedHi All, As you may know, there have been a few problems with running L3DT on Windows 7 using the Aero theme. I am pleased, and quite relieved, to announce that these problems should now be fixed in the latest developmental build of L3DT (v2.8 build 23), for systems with up-to-date graphics drivers. I have verified this build renders properly in Aero themes on Windows 7 Professional, using an NVIDIA GeForce 9600 GT graphics card with driver version 8.17.11.9745. The updated installers, in Standard, Professional and Pro for Torque are available from the usual places. If problems persist...If you find Windows is still resetting your graphics driver when running this build of L3DT, or the display freezes and then the system reboots, I strongly recommend you update the drivers for your graphics adapter. If updating your drivers does not fix the problem, please file a bug report in this forum thread. When reporting this bug, please, remember to quote the type of graphics card you have, as well as the driver version. If you’re not sure how to get this information, you should open the Windows Device manager, expand the display adapters tree node, right-click on the sub-item listed under display adapters, select the properties menu option, and then click on the drivers tab. This should result in a window looking something like this:
The relevant information to quote in your bug report are the adapter type (see window title), the driver version, and the driver date. Best regards, Aaron. January 2User interface changesHi Everyone, [Aside: Happy new year!] Methinks it’s time for a little clean-up of the L3DT user interface. Changes include:
All in all I think these changes should make the user interface a little easier to learn for new users, without having any lasting adverse effects on current users. However, if you have any strong feelings about these changes, please feel free to post a comment in the forums. These changes are included in the latest developmental build of L3DT Pro (v2.8 build 6), which is on the downloads page now. These changes will also be included in the next builds of the Standard and Pro for Torque editions when they are next compiled. Please note that the on-line user guide has not yet been updated to reflect these new changes. The documentation will be updated when these changes are rolled into the next stable release. Until then, please feel free to ask for help in the forums if you can no-longer find a menu option. Best regards, Aaron. December 11ZeoScript compilerHi Everyone, In the latest build of L3DT Pro (v2.8 build 2, 10th of Dec ‘09), the ZeoScript plugin has been updated to use a just-in-time (JIT) compiler. The effect of this compiler is to increase the speed of loops in ZeoScript, and that it has achieved. Map calculations in ZeoScript should now run at least 5x faster than before. Syntax changesUsers should also be aware that the syntax of the ZeoScript language has been revised for greater clarity and ease of use. I have updated the example scripts provided with the new installer, but if you use custom scripts, you may need to modify them to work with the new release. Below I have included a listing of all the major syntax changes: Nested function callsFunction nesting, whereby one function’s return value is fed into the argument list of another, was previously achieved using the <zs:ScriptText> operator. Now, the ‘zs:’ component is redundant, so nested functions are denoted simply by the < and > braces. The examples below show the old and new way of calling nested functions. Here, the values of c and d are added together, then multiplied by b, and finally a is assigned the resultant value:
By removing the ‘zs:’ component, the purpose of the code becomes more obvious, and this should make the language both easier to use and learn. Accessing maps, file formats and global variablesPreviously, to retrieve a map from the L3DT map project, one used the <m:MapName> operator. This special operator has been replaced by the ‘GetMap’ function, which otherwise behaves in much the same fashion, as shown below:
Similarly, the <f:MapName MapType FileExt> operator for retrieving file format handlers was replaced by the ‘GetFormat’ function, and the <v:VarName> operator for retrieving global variables was replaced by the ‘GetVar’ function. Casting variable typesTo cast a variable value from one type or another, it was necessary to use the <cast:type var> operator. This has been replaced by a ‘cast’ function, but as it happens, the resulting syntax is almost identical:
[note that the ‘:’ is no longer necessary] Pointer referencing and dereferencingIn previous versions of ZeoScript, the interpreter would automatically reference variables and dereference pointers as required. In the new version, users now have responsibility to manage pointers, just as with C/C++. As an example, the code below shows the use of the function ‘EditUI’ which takes two arguments, the first of which is a pointer to a variable (a hvar), and the second is a string. In the new compiler, you must manually reference the variable using the & operator to get the hvar, like so: int i EditUI &i "Enter integer" // edit i (using & to get handle) In the old interpreter, you could pass any variable in as the first argument, and the interpreter would automatically reference the variable to get the hvar: int i EditUI i "Enter integer" By disabling automatic referencing/dereferencing, I hope to make it more obvious whether fucntion arguments are being passed by value or by reference. However, this behaviour may be more difficult to learn for scripters not familiar with pointers. Consequently, many examples are provided. elseifIn addition to the ‘if’, ‘else’ and ‘endif’ statements, I have now added an ‘elseif’ statement to permit neater if/else chains. For example, the following code prints a different message depending on the value of an integer i. if <isgt i 10> echo "i is greater than 10" elseif <isgt i 5> echo "i is greater than 5 but less than or equal to 10" else echo "i is less than or equal to 5" endif In the old interpreter, the ‘elseif’ used above could only be achieved by nesting an if statement within an else statement, like so:
if <isgt i 10>
echo "i is greater than 10"
else
if <isgt i 5> // nested if in else, instead of an elseif
echo "i is greater than 5 but less than or equal to 10"
else
echo "i is less than or equal to 5"
endif
endif
By permitting ‘elseif’, we save on some unnecessary nesting, and simply the structure of the if/else chain. Future changesAny further development of ZeoScript will be focussed on improving the execution speed of the runtime engine, and extending the range of functions and features available. I do not anticipate making any any further changes to the syntax of the language, as I feel ZeoScript now meets its requirements with a minimum of fuss. Hence, scripts written for this new ZeoScript plugin should continue to work indefinitely with future releases of L3DT (that’s the plan, anyhow.) DocumentationI have not yet updated the examples or reference pages for ZeoScript, as those pages represent the state of ZeoScript in the current release-version of L3DT. These pages will be updated for the next release, which will likely be v2.8a, in the near-ish future. In lieu of updated documentation, I have updated all the scripts included with the installer, which provide examples for most of the scripting features. However, if you require additional information or help, please feel free to ask in the plugins and scripts forum. Best regards, Aaron.
|