Animation by Expressions
Created Monday, April 7, 2008 | Added Tuesday, February 21st, 2012

For this project, we were either supposed to create an animation solely using MEL scripts to animation, or we were just supposed to use MEL to animation at least one thing.  I’m thinking it was the latter, but I chose to do the former.  Either way, I decided to create a Tetris/Bejeweled-like animation.  The MEL script that runs the entire animation creates a block of a random color (out of five colors), starts it in the top “row” in the middle “column.”  The block then moves down on “row” at a steady pace while the script randomly moves it from side to side.  Once the block hits either the bottom of the stage or hits the top of another block, a new block is created and the process repeated.

Two other things that I thought I programmed in (but I don’t see in the videos…) are the when the stage is full and there are no more possible moves to make, the stage would be cleared of blocks, and the entire process would start over.  The other is that I thought I had it so that if three blocks or more of the same color lined up together horizontally or vertically, they would disappear and any blocks above them would move down.  Maybe I just had planned to program those but never did… :-/