GSOC Resume.

My exams were over, I now have to turn my attention back to Director engine. I continued to work 5 days ago. And next things have emerged:

Little/Big Endian

Starting from Director 4, RIFX containers can have little-endian byte order, specifically for this, regular ReadStream was amended to ReadStreamEndian and now engine can work with both orders. In so doing, byte order is determined by first tag (“RIFX” or “XFIR”)

Shared casts

In the majority of the movies, casts not stored directly in the movie. There is a special file, with a special name (surprising!) that stores, common to all movies in folder, sounds, images, texts. For this situation, renew shared casts immediately after jumping to new folder was written. Shared may be some regular buttons for game.

For example: (Spaceship Warlock in our engine)


But determine shared cast movie name still a problem.


Significant progress has been made by sev : storing local/global variables, Lingo macros, built-in-functions and more… On my part, were introduced execution go to loop, go to next/previous commands.


Reading text resource realized a long time ago, and it time to deal with rendering issues.  Director font map has been reviewed by sev. And it was decided to use classic mac fonts data file for drawing our text. Future target: rendering with box shadow, borders (if needed)

GSOC pause

As it happens, I needs to complete some work related to my student status. It’s about my exams. In this regard, in the coming week my time should be given to questions about tropical geometry and information models/processes.

At the end of week, I will continue to work on Director engine.

Director: New week – new challenge

And once again I’m writing about my GSOC progress.

This week:

  • Loading transition info and implementation of some movings (8/52).
  • Imitation 2 track sound system (such as in Director).
  • Rendering trail sprites (it works like background images)
  • Parsing new kind of scripts  – movie scripts.

Speaking of scripts,  there is a work on the Lingo compiler by sev.  There is, at present execution some media interface commands like play part of sound files and the processing of alias map. Also put/set commands have been added.

Were reviewed, Director ‘go to movie (label)‘ commands. In many games this is main command, with this you can simulate  walking across levels. But this transition using special name of movie, and because of that movie loading was redesigned.

I know I promised to show The Journeyman Project movie files. But right palette still got trouble.

Specifically for this post, I’ve copied in my local code, palette, which contuinity uses as fallback. And some of JMP movies seems more or less pretty.


Director: Initial Lingo, events.

A week went by, engine changes, but slowly. Now is the moment when differences in Director versions are important.

Under the supervision of sev, I started to learn life cycle of the playback/draw system, it’s important because it can tell about when causes local events, such as frameEnter, frameExit, idle. In other words, we want to achieve event order, same as in Director. For me personally, it was hard to figure out what order is correct, sev advised me to check it right in Director. Because our target game is Journeyman Project, I looked in 4.0 version. By writing a simple script, I have found right positions in my code for calling this events.


It is worth noting, that in other versions the order differs, part of the problem is new events (D6: stepFrame, prepareFrame, beginSprite …).

Maybe you have already guessed that, this events are necessary for our feature Lingo interpreter. In addition to the system events, I’ve also added mouse events, this event are sent to clicked sprite on top layer.

Simple sound wrapper had been written, in JMP we’ll see .wav and .aiff formats. ScummVM audio decoders deal with this.

Decoder for 1bpp pictures was also added. This pictures are sometimes used instead text.

There is now some issues with 256 color palette loading. I hope problems will be solved, and in the next report I can show movies from The Journeyman Project.

Director: First official GSOC days

In previous post I promised to implement frame by frame system and deal with transparent objects.

At the beginning, I have written tempo channel handler. And depending on the frame tempo value (FPS/Delay) , it can determine time for next frame. Some examples:


In fact, movie frames also can be on a loop by simple Lingo script.

Works was also done:

  • Reading movie configuration
  • Movie labels data
  • Reading (and only reading) scripts on frames.

… some work with transparence was done.  Sprites have Ink flag, this value have many things to tell.

Little was achieved: BackgndTrans (all white pixels must be removed) and more complex Matte (all white pixels out of object must be removed). Of course, future targets: cover all Ink’s.

To achieve that objective, I’ll start testing more powerful movie examples then catching new sprite types.

Director: Just add a little moves

When we learn how to to deal with Director objects, our aim will be to build a structure, that can execute animations.

For this purpose, three working classes were established.

Sprite – information about position, size and reference to cast data.

Frame – set of sprites and information about tempo, delay, palette.

Score – just set of frames.

Information about score data is located in fourCC ‘VWSC’. This also provides information for our timeline.

So, if we use it well for our DIB casts, we get well-suited result:test

As you may have noticed, there are some problems related with transparency sprites. So bad.

In addition to this issue, some cast information, like sprite rectangle  will be needed in the future. I also hope, that by next post I get to show  implementation FPS.

Director: The first resource is ready

One of the main resources of the Director is DIB pictures, we will often meet it in our bookshelf animations. In map of objects  DIB has FourCC ‘DIB ‘ and color palette is  ‘CLUT‘.

We have faced with example with 4bpp pictures (16 colours).  Decoding colour table had been no big problem, but at the decoding picture stage was seen absence of 4bpp decoder.

This has been fixed by adding new codec MSRLE4.

Some planets from animation:

At the moment we are working with simple examples, where pictures constitute the bulk of casts. So I decided to start working on problems such loading score data (timeline structure) and addition of tempo channel. In the end we will get our first simple movie.

The engine is still available on