Introduction

The EGI compiler is a script driven animation compiler. Please refer to the manual for the general syntax and features of the script language.

To exit the program, open the menu and choose the "Exit" item. Alternatively, you can type Alt-F4 or Esc.

Topics

•	Open an existing script file

•	Create a new script file

•	Save a script file

•	Compile a script file

•	Edit a script file

•	Test an animation

•	Drag-and-drop interface with the Microsoft Windows Explorer

•	Using the "script guide"

•	Install an external editor


Using the EGI compiler


Open an existing script file

Open a FLIC file with the “Open script file...” item on the menu.

To open the menu, use the [image] button or the F10 key.


Create a new script file

To make a new script, select “New script” item of the menu. This opens a sub-menu with two choices:

•	Create an empty (blank) script

•	Launch a dialog based “script guide”; the script can later be customized and extended by editing it.

To open the menu, use the [image] button or the F10 key.

Creating a new blank script

•	When using the internal editor, the editor opens so that you can type in your script. You will be asked for a filename when you close the editor or before compiling the script.

•	When using an external editor, the EGI compiler asks you for a filename directly after creating a new file. The new (empty) file is subsequently loaded in the external editor.

Using the “script guide”

The “Script Guide” is convenient to set up simple scripts from a list of image files. The script guide allows you to select the images to include, to order them, and to make global adjustments to the animation (speed, compression, transparency features, etc.).

More help on the script guide...


Save a script file

Saving a script file is automatic. Every time before compiling a script or when closing the editor, the script file is written to disk.

Alternatively, you can save a script explicitly with the “Save script file as...” option from the menu.

To open the menu, use the [image] button or the F10 key.


Compile a script file

To compile a script file:

•	open a script file or create a new script file

•	Click on the [image] button, or type F3.

The animation file has the same filename as the script file, but with the extension .FLC.

You can abort a compile run by clicking on the [image] button (or typing F4).


Edit a script file

To edit a script file:

•	open a script file or create a new script file

•	Click on the [image] button, or type F7.

If a script is compatible with the script guide, the EGI compiler gives you the choice between the text editor and the script guide. Next to the internal editor, you can also set op an an external editor.

The script file is automatically saved when you close the edit window (or leave the script guide). The script file is also saved when you close or compile the script file. To close the edit window:

•	Click on the “Edit” button again, or type F7.


Test an animation

With the the [image] button (or type F5, you can launch the EGI player. The player will automatically open the compiled animation file that matches the script file. If you recompile the script file, the player re-opens the animation file.

You can also start the player from the menu (to open the menu, use the [image] button or the F10 key).


Drag-and-drop interface

When dropping a script file (.SCR) onto the EGI compiler...
The EGI compiler opens the script file and displays it in the editor.

When dropping a picture file (.PCX, .BMP, .TGA, .SPR) onto the EGI compiler...
The EGI compiler adds a frame referencing the image in the edit window at the current cursor position. If no script file is open, the EGI compiler creates a new script.


The ``script guide''
The “script guide”

After selecting the option “new script” from the menu (use the [image] button to open the menu), you are offered the choice between an empty (blank) script and the script guide. The script guide assists you to create a new script from a list of images, using a dialog-based interface:

To create a script, add image files to the file list in the left part of the dialog and select the appropriate options at the right.

Standard options

•	256-colour FLIC file: choose this to create a FLIC animation that is compatible with all players

•	Identity palette: animations play faster when using an identity palette, due to the design of the Microsoft Windows Palette Manager; all pictures must share a single palette to use this option

•	HiColor FLIC file: 16-bit RGB FLIC files are only supported by EGI and DTA (Dave’s Targa Animator)

•	Dither input images: when reducing “True Colour” images (24-bit RGB) to 256 colours or to HiColor (16-bit RGB), the compiler can apply dithering. Dithering improves the visual quality, but usually degrades the compression ration. In other words, adding dither results in prettier images and larger files.

•	Speed: in milliseconds between two frames

Compression

•	FLIC standard: Choose this to create a FLIC animation that is compatible with all players.

•	Medium compression: Better compression which is still quick to decode. (Only supported by EGI.)

•	High compression: A compression ratio similar to that of ZIP files, quick to decode but slow to encode. (Only supported by EGI.)

•	Frame shifts: Frame shifting records the approximate “motion” from one frame to another. On some animations, this results in significantly improved compression. The frame shift records are slow to encode. (Only supported by EGI.)

Transparency

•	None: choose this to create a FLIC animation that is compatible with all players

•	Bitmap masks: simple transparency masks (only supported by EGI)

•	Multilevel masks: for use with AniSprite or other sprite libraries (only supported by EGI)

•	Region masks: to play animations over the desktop or other applications (only supported by EGI)

•	Transparent colour: the palette index for the transparent colour, or an RGB colour specified in the syntax “#RRGGBB” where RR, GG and BB give the values of the red, green and blue channels with in hexadecimal digits (for example, “#FF0000” is bright red and “#800080” is dark magenta)


Configuration


Setting up an external editor

The internal editor in the EGI compiler is limited to script files of approximately 32 kBytes in size. To edit larger script files (and to get access to more advanced features like search & replace and syntax high-lighting), you can set up an external editor.

The EGI compiler has two interfaces to editors:

•	The command line interface launches the specified application with all (if any) options. In the options, a %s symbol is replaced by the full path name of the script file and a %d by the line number (in the case of error messages).

•	The DDE interface, if available, is quicker and avoids that several copies of the editor are active concurrently. If your editor does not have a DDE interface, leave this line blank.
    The DDE command string consists of three (or more) sections separated by a vertical bar (“|”). The first two sections are the DDE “Application” and “Topic” strings. The third and subsequent sections are the commands to send to the editor to open the script file and to position the cursor.
    Again, a %s symbol is replaced by the full path name of the script file and a %d by the line number.


The name of the script file that the script guide generates. You may either choose a new file or select an existing file. If you choose an existing file, that file will be overwritten with the new generated script.

If you leave this field empty, the name of the output file is derived from the filename of the first image in the file list.


This list will contain all the files that you add to the animation.

With the buttons below the file list, you can:

•	add files to this list,

•	remove files from the list,

•	or preview an image from the list.

The buttons at the right of the file list, with the “up” and “down” arrows allow you to change the order of the files in the list (move selected files up or down).


Opens a dialog that lets you choose an image file to add to the file list.


Removes the selected file(s) from the file list.


Opens a preview window that shows the selected file. This button is only active if you have selected exactly one file in the file list. You do not have to close the preview window to view another image; you can simply change the current selection and the preview window will be updated.


Moves the selected file(s) up or down in the file list.


Sets the colour resolution to be 8-bpp, for 256 colours. This is the standard colour resolution of FLIC files, and it allows for maximum compatibility.


Sets the colour resolution to be 16-bpp, for 65536 colours. HiColor FLIC files are non-standard, and thid-party utilities may refuse to load them.


256-Colour FLIC files (8-bpp) may optionally use an “identity palette”. An identity palette improves playback performance in Windows, but it may (slightly) change a few colours in your images.


Dithering is a special case of halftoning. Dithering (usually) improves the visual quality of the images at the cost of giving lower compression.

Dithering is commonly associated with 256-colour images, but EGI can also apply it to HiColor (16-bpp) FLIC files.


Sets the delay between two consecutive frames in milliseconds. A common value is 70 (ms), resulting in approximately 14.3 frames per second.


Sets “Run Lengh” compression: the standard compression method for FLIC files. The compression ration is fairly low, however. Use this compression setting for best compatibility with third-party utilities.


Sets “Huffman” compression: a compromise between compression and playback speed.

Huffman compression is non-standard, and third-party utilities may refuse to open Huffman-compressed FLIC files.


Sets “Burrows-Wheeler Transform” compression (BWT). It achievs a compression ration comparable to state-of-the-art compression algorithms, but features a high-performance decompression routine (ideal for animation). BWT compression is slower than Huffman compression (“Medium compression”).

BWT compression is non-standard, and third-party utilities may refuse to open BWT-compressed FLIC files.


“Frame shift” compression is a non-standard compression method which is similar to “motion encoding”.

Frame shift compression is non-standard, and third-party utilities may refuse to open frame-shift-compressed FLIC files. EGI introduced frame shift compression with version 4.0; earlier versions of EGI will not play it.


Sets “no transparency”. Use this compression setting for best compatibility with third-party utilities.


Adds “bitmap masks” to the FLIC file. See the manual for details on mask types.


Adds “multilevel masks” to the FLIC file. See the manual for details on mask types.


Adds “region masks” to the FLIC file. See the manual for details on mask types.


Sets the colour value that is to be considered “transparent”. The colour can be given as a palette index, e.g. “241” (without the quotes), or as an RGB colour in HTML syntax, e.g. “#FF00FF” for magenta.