Scripting Language for Animating Polly's (SLAP)

This describes a simple language for creating animations based on Polly.
It assumes (for now) a created environment in which the action will take place.
Therefore, it can be included in a larger scheme, where this language will be used only for short local interaction in specific locations (scenes). It is well suited for this task, since it tries to keep the syntax and possibilities simple, and fairly low-level.
It does :
  1. Provide a simple interface to the underlying polly engine
  2. Enables scripting scenes with multiple Polly actors
  3. Can be read and written by humans (uses defines and named commands)
  4. Can be easily read/written to by higher-level tools (the syntax is well-defined and unambiguous)

The most important directive (the comment) is the # character, till end of line. (in the style of Unix scripting languages). Example :
define idle 0 			# this describes the idle action
The scripting language includes support for simple word substitution -- this is to facilitate using actual words instead of numbers as parameters.
The given word will be replaced by the given value when the given word appears as an argument to another directive. (i.e. a time directive -- see below)
For example, we can define Polly's actions :
define idle 0
define scamper 1
define swagger 2
define broadjump 3
define prowl 4
define lumber 5
define dejected 6
define no 7
define yes 8
define hotfeet 9
define sprint 10
define hop 11
The language is centered around time, rather than actors. This helps coordinate all the actors.
The main directive is the time directive. It sequences the following commands to a certain frame.
time[p] time_value 
actor number attribute args ... 
object number attribute args 
camera position direction
Simple mathematics is also available for the arguments :
define PI 3.1416
actor 1 direction PI/4
We can initialize the scene by setting time to 0 :
time 0
define red 1 0 0
define green 0 1 0
actor 1 position 0 0 # in the middle
actor 1 color red
actor 1 size .9 # the larger actor
actor 1 action idle
actor 2 position 2 0 # to the right by 2 units
actor 2 color green
actor 2 size .6 # the smaller actor
actor 2 action idle
We can then have actor 1 move diagonally :
timep 5			# 5 seconds later
actor 1 direction PI/4 # 45 degrees
actor 1 action swagger # start walking
And stop some time later
timep 10
actor 1 action idle

Questions, comments, etc : Lev Iserovich