![]() ![]() |
The name of the game with Alambik Script is to create
audiovisual content which appears exactly the way you want it. Such content
can be displayed in a web browser like Internet Explorer, in a special window,
in full screen mode, or in Alambik's own MC Player. Although Alambik Script is a powerful audiovisual tool, it's also surprisingly easy to use. All of Alambik's commands are natural and easy to remember. This comes from the fact that Alambik Script is a high-level language, based on English and employing a clear and logical syntax. To display a bitmap image, for example, the command picture.display, followed by a few simple parameters, is all you need to use. The same simplicity applies for 3D objects (mesh.display), and so on. It's that easy -- all the commands you need for crafting powerful scripts can be memorized and put to use with minimal practice. Alambik Script addresses the needs of a large pool of users, consisting of different groups with varying levels of experience. People who use Alambik include seasoned programmers, less programming-savvy graphic artists, musicians, and marketing professionals, along with a whole range of others. To make audiovisual scripting quickly accessible to all, Alambik's instructions come in a range of difficulty levels. We have grouped our programming instructions into the following three categories: 1.
Basic instructions We invite you to pick and choose from all of these categories, selecting
the instructions which best match your needs and skill level. |
![]() ![]() |
Advanced instructions let you be more creative by introducing
the notion of "plug-and-play" objects. Plug-and-play objects are
ready to use right after creation and require no special customization (for
example, once you create a camera or a viewport, you don't need to give
any more information or write extra instructions in order to begin using
the object right away). The one exception to this rule arises if you want to animate plug-and-play objects. To do this, you need to specify additional information (such as tracks and movement) using the Alambik keyframer. 2.1 - Displaying an Alambik Object using an objectID 2.1.1: General Case: More powerful than basic syntax, advanced syntax instructions let you
manipulate objects using ObjectIDs. an objectID is essentially a numeric variable
which isn't meant to be used for normal operations (like adding, subtracting,
etc.). Instead, ObjectIDs are special names which represent Alambik objects
and let you manipulate them during a script's runtime. @picture = picture.load ("sky.jpg") Here, @picture is the ObjectID for the image "sky.jpg." Filename represents the path (always written in quotes) of whichever object we want to load into memory; Object stands for the type of object we want to load; and @ObjectID is
the name we're giving to this object. You can choose any name you wish
for an objectID. It's always best, however, to use a meaningful name which
best represents the kind of object you're identifying. By convention,
ObjectID names must always be preceded by a @ identifier. 2.1.1: Starting out with real-time 3D: In order to create striking, real-time 3D environments with Alambik Script,
it's necessary first of all to attain an understanding of some basic 3D
concepts (see glossary). 1. 3D for beginners Even if you're new to 3D, you can get started right away. Alambik lets
you display and animate some impressive-looking 3D primitives (Cubes,
Spheres, Cylinders, Tubes, Toruses, Quads, Disks, and Rings) using simple
instructions. mesh.cube.display (CENTER,CENTER,200,200, NULL) will display a cube in a 200 x 200 pixel area (the viewport) located
in the center of your screen. mesh.cube.display (CENTER,CENTER,200,200, "texture.jpg", NULL)
@track=track.create(TRACK_LOOP_SMOOTH) Advanced 3D instructions give you the ability to modify, load, display,
and manipulate 3D meshes within scenes.
Once a primitive is created in this manner, you can then modify it, add texture (using a material), animate it, etc.: @track=track.create(TRACK_LOOP_SMOOTH)
2.2 - Changing the characteristics of Alambik Objects
".set" instructions are applied directly to objects and take action immediately. @sprite = sprite.load ("sky.spr") This series of instructions, for example, immediately changes the position of a sprite. The sprite will no longer be displayed at position 0,0 but instead at 100,100.
".select" instructions let you specify a mode or setting for
all objects up until the next ".select" is invoked. In the following
example, the text will first be displayed in red, then in green. text.color.select (COLOR_RED) 2.2.3 ".stack" instructions ".stack" instructions are used to modify objects. Unlike ".set" instructions (which act right away), ".stack" instructions affect only the subsequent display of an object. For example: @picture = picture.load ("sky.jpg") In this case, the size of the image sky.jpg will be changed to 320 x 200 pixels, then displayed in its new size at position 0,0 (i.e. the top left corner of the screen). NOTES: A ".stack" instruction will affect the subsequent display instruction for any bitmap AVO (Picture, Icon, Pattern, Panel, Button, Mouse, Sprite, Text). Thus, in the following example, the icon will be resized, but not the picture. @picture = picture.load ("sky.jpg") Several ".Stack" instructions can be combined together. All of them will affect the next object to be displayed. For example, the following instructions can be used to resize and rotate the image sky.jpg :
|
![]() ![]() |
The expert level introduces instructions which enable you to dynamically
create:
3.1. Bitmap Objects. By combining such commands with mathematical and conditional instructions,
coupled with a clear understanding of the audiovisual environment (3D
spaces, etc), you harness the full power of Alambik Script. 3.1 Dynamic creation of a bitmap: By using the instructions picture.create and icon.create, coupled with
a virtual screen and 2D graphics primitives, you can create beautiful
bitmaps which never have to be downloaded.
3.2. Expert Real-Time 3D: Dynamic texture generation uses dynamic bitmap creation to create bitmaps which function as textures. For example: @picture=picture.create(320,240) 3.2.2. Dynamic Creation of 3D Meshes. Alambik Script allows you to create your own meshes by setting each vertex. For example, in the following example you will create and animate a cube (consisting of 8 vertices) : @Seq =track.create(TRACK_LOOP_SMOOTH) |