- Index of TkScript » Documentation
- Index of TkScript » Documentation » TkScript reference guide
This Reference Guide
is meant as a hands-on
documentation for the TkScript language and its
It does not teach programming in general. However, I tried to include as many (self contained
) code examples as possible.
If you already know other (procedural
) programming languages, this guide should get you started with TkScript in no time.
If you don't, never mind, the hardest part of "programming" is usually not the syntax, anyway ;)
Here are a few hints that you should keep in mind:
- Memory managment is, to a certain degree, up to the script application !
- There is NO garbage collector
- Nevertheless, memory allocation speed is close-to-optimum due to object pooling. a good, optimized C runtime (e.g. GNU libc) is almost as fast as this. however, benchmarks with other C runtimes have shown that a 2-700% speed up can be achieved.
- Make sure to read
Spawning new objects
- For novices: it is often not necessary to use "pointers", most objects can copy other objects (=)
- RAII (Resource_acquisition_is_initialization, look it up on the web!)
- TkScript is a *support* language for compiler languages like C and C++. it is not meant to replace them !
- Put your number-crunching, pixel-pushing, cpu-intensive loops in a native C++/YAC plugin !
TkScript is available as source code which is distributed under terms of the GNU General Public License.
Precompiled packages for Win32/X86 are released on a regular basis.
The sources can be compiled on Win32, Linux, Cygwin (tested) and probably also on other Un*x - alike operating systems (Solaris, Irix, QNX, FreeBSD, ...). Also see
Compiling on GNU/Linux
TkScript uses zlib
to handle compressed script packages (
The script engine has been tested on several CPU architectures including Intel x86, Motorola 68K, PowerPC and ARM v5-v7.
The plugin libraries have different requirements, e.g. OpenGL 1.1 and SDL/SDL_net are required for the
The JIT is currently only supported on X86/32bit. A new JIT (featuring e.g. register allocation) has been developed which currently supports the
instruction set architectures (ISAs
) but it still needs to be integrated in TkScript.
Please see the
page for details on how to obtain and install TkScript.