Advanced TAME
Advanced TAME

Advanced TAME

This section outlines some of the more advanced things that TAME or the TAMEScript Compiler does for those curious about some of the inner workings of TAME.

E.1 Optimization

The TAMEScript compiler performs some under-the-covers optimizations with expressions that are comprised of literals - the compiler will collapse these expressions as much as it can to minimize the amount of function calls and operations.

Run the following as Debug and Trace to see this in action:

Optimization Example


world
{
	start()
	{
		local a = (5 + 4 - 1) * 5 / 8;
		textln(a);
		quit;
	}
}

E.2 Diagrams of TAME Setups

For the most part, the most common TAME setup is this one - a user that interacts with a shell that changes a context, and the separation between shell, context, and module doesn't exist (for instance, most all-in-one adventures or games).

But to be honest, they do not have to be together conceptually - the shell can be a dumb terminal that relies on the context for parsing and execution, like a website that holds a context and the engine in memory, and can change its frontend appearance at will, or start new games.

In fact, in some multi-user versions, you can have a system built to handle input from many users with many separate contexts, all built from the same module, like a old-school UNIX-style terminal system or an interactive IRC bot!

It is this separation that gives TAME additional flexibility, be it for authoring, rendering, or running on multiple platforms that have a TAME implementation. But regardless of the implementation, TAME still follows the same Request-Response model.

×

Modal Header