ZZT-oopZZT-oop is possibly the first in-game scripting language ever written. ZZT-oop was designed by Tim Sweeney as the scripting language used for his ground-breaking computer game ZZT.
|Table of contents|
2 Peculiarities and limitations
4 Closing Thoughts
ZZT-oop is both object-oriented and multi threaded, it is a linear script of instructions prefixed with symbols that has a direct connection to an in-game "object" or scripted entity. Each object has a geographical position within the game, a single script, and a single point in this script that execution is currently at. It wholly a game scripting language with little other use, it may be seen as a precursor to the far more advanced UnrealScript by the same author, and indeed possibly all game scripting languages.
Peculiarities and limitations
The ZZT-oop language is very limited in application to say the least. It was designed for simplicity rather than flexibility. Boolean flags are the only type of variables, making arithmetic impossible, forcing the programmer to be creative with algorithms relying often on physical movement, possibly in invisible (but still physically present) objects rather than arithmetic calculations.
Although ZZT-oop is object orientated, objects are not instancable due to their physical nature, meaning that one needs to duplicate much code to create complex systems.
Functions are impossible also and therefore routines are likely to be interrupted restored by rouge messages including ones sent by the object itself when it is shot or touched and never completed, one can overcome this crudely using state flags or using the lock and unlock command during important routines however this is likely to cause the object to miss out on signals.
ZZT-oop is wholly run-time interpreted with no pre-passing, no Lexical analysis is performed before running, nor is any byte code translation applied. This means that any errors are reported in a cryptic way during running and makes debugging time consuming and frustrating.
However the language does have some advantages, its simplicity and intuitiveness for one, its lack of mathematical operators and integration within a fun game makes it very nonthreatening to budding programmers in primary school. The physical nature with a concrete geographic position makes objects far easier to visualise than abstract data types, and the parallel operating multi thread design is easy for one to think about in terms of a dynamic environment.
The syntax of the language is simple, there are 4 categories of instructions:
ZZT-oop provides a great stepping stone into programming especially for children, it has a huge amount of historical significance, it will provide one with many hours of fun, but very little else.