Lunar Magic 1.7x+ ExAnimation Tutorial
2. Basic Explanation
3. The Animation Box
4. How to Set up a Simple Animation
A) Continuos Animation
B) Pow Animation
C) On/Off Animation
5. Other Triggers
6. How to Set up a Palette Animation
7. Other Palette Types
Hello there and welcome to the Lunar Magic 1.7x ExAnimation tutorial. In this tutorial I will be explaining the basic animations, how to set them up, as well as the triggers, how they work, and how they can be setup. However before I begin I would like to stress that this is not a complete explanation on ExAnimation. There are certain parts of the tutorial that I leave out as I do not know the coding to make them work correctly, primarily custom triggers. I may come back to edit this should I learn of how this is done, however at the present time it is not explained. Now for this tutorial there are two basic tools that one will be needing: Lunar Magic 1.71
as well as some understanding on map16 and ExGFX insertion.
I should also note that there is a HTML document available for download should anyone want a hardcopy on their hardrive.
2. Basic Explanation
ExAnimation is the process by which standard block or palettes are animated to give a level a more unique feel or to ensure that certain graphics remain similar to that of where it was ripped from, the SMB3 animated brick blocks for example. ExAnimation is really more of an add-on in terms of gameplay and level design, however it is often a plus in terms of a level's uniqueness and appeal. For this reason it is best that it becomes explained to ensure that many more people are able to, with confidence, use ExAnimation within their levels.
3. The Animation Box
Red Line - The ExAnimation slot, or which animation slot that you want to use. Each animation slot has it's own individual slot that can be modified to suit ones needs.
Blue Line - This part of the ExAnimation is how the graphics are collected. Whether this is through individual 8x8 tiles, two 8x8 tiles horizontally, two 8x8 tiles vertically, or a 16x16 tile. Though it may be easier to compile 16x16 tiles for ExAnimation, it is much easier on the SNES to use the 8x8 tiles in a row.
Green Line - The destination field, this is the 8x8 location of where the animated tile is to go. This location is varying depending on its usage, however most often one will be replacing a tile in FG1, FG2, BG1, or BG2.
Dark Green - This is the triggers location, or how it is that the ExAnimation is activated. There are numerous ways to activate it, each of which are described in the triggers part of the tutorial.
Dark Blue - The amount of frames and the frames themselves. The amount of frames is a number (in hexadecimal) that indicates the amount of frames that are to be used for the ExAnimation. The frames themselves are the locations of the 8x8 tiles in the ExAnimation graphics file for which the separate frames are built upon.
Orange - Frame tools, these basically allow one to copy and paste separate frames as well as copy and paste the different slots to a different level. These are self explanatory, I should not have to explain this in more detail.
4. How to Setup a Simple ExAnimation
A) Continuos Animation
Now that we know the different parts of the animation box we can now start with some basic animations (hooray!). For this first example I am going to be explaining how to setup a simple animation, or one that requires minimal figuring in how to set it up. For this example I am going to be using the SMB3 Jelly Fish graphics
to use a realistic example.
Now the first thing that you want to do is to insert the ExAnimation file that comes with the graphics file, simply because we need to use those graphics to create the frames, I know it's amazing. Now once the graphics are inserted we setup which ExAnimation file to read from in the Super GFX Bypass Window. Check the box to bypass the standard graphics and select your ExGFX file that contains your animations, in this case the SMB3 Jellyfish:
My window is slightly modified from the standard window, however the locations of the different parts are in relatively the same areas.
Once this is done you will need to open three windows, the 8x8 Tile Editor, the 16x16 Tile Editor and, obviously, the Edit Level Extended Animation Frames Window. Now, in the 8x8 editor one cannot access, or for that matter see, the animation frames that one just inserted. To see them press the control, shift, and page down buttons at the same time. When one does this, in the bottom of the 8x8 editor it should state: Internal GFX data viewing unlocked
. Now one can the see the animation frames and where they are stored. Scroll down to this area, please.
When one scrolls down, one should see the animations that are to be used for the jelly fish1
. If one puts their curser over one of the individual 8x8 tiles, one should see a hex value for that individual tile, for example 0x680, at the bottom left of the editor's screen. One will be constantly be referring to these values when creating their animations. However before we start we need to setup the basis for the ExAnimations. For this we need to go the Edit Level Extended Animation Frames Window, or for short, so I don't have to constantly type the long name, the ExAnimation Editor Window.
Firstly, one chooses which animation slot that they want to use. By default it will be slot one, which is most often, empty, or unused. Secondly one chooses the type which dictates how the tiles are to be accessed, or in which way. How the graphics are setup in the ExGFX file often dictates how one selects their type. What the individual type does is fairly self explanatory as how many tiles it collects is explained in its name. Why there are various copies of 8x8s: line
is beyond me. For this particular part, one only needs to worry about the 8x8 selections as I will be explaining palette ExAnimation later in the tutorial. Anyways select one, in this particular case I will be choosing Type 2: 8x8s: line
Lastly, one chooses the trigger. The trigger indicates how the tile will appear given the activating of a certain item or given a certain counter. The trigger: none, indicates that the animation will continually move, or move all the time no matter what other trigger is activated. This is the trigger that is to be used in this example.
Now, comes the somewhat time consuming part, the transferring of frames. If you remember the hex tile value that appeared in the 8x8 window as one placed the mouse over the individual tile, this is value that gets inputted into the frames part of the animation. Based on the type that one chose, one has to be wary on how one chooses their 8x8 tile. However the same rule applies for each type, choose the left-most and top-most 8x8 tile. In an 8x8 line, one would choose the leftmost tile, in this example, choosing tile 680 would use both tiles 680 and 681 in the animation frames. With this in mind transfer, or type out, the tiles that are to be used in their individual frames. For example frame one would be tile 680, frame two would be 684, etc. Please note that these tiles are in hex, not in decimal.
Once the frames have been inputted into the frames window, count up the amount of frames and place this in the frames window. This value must be in hex. So for example, if it goes over 9, one would start counting up A,B... F and there on continue to 10,11,12 etc. If this is confusing please consult an ASM tutorial.
Now the last thing that thing that needs to be added is the graphics location. This is basically the location of where these animations are held. This can be any location, FG1, FG2, etc. For this example, I'll use the first tile of BG2, or tile 200. Once all has been said and done the ExAnimation Screen will look similar to this:
However being as Iceguy's included readme states to use double frames, this is how I set it up.
Press okay and when one goes to look at tile 200 in the 8x8 editor one should see an animation of the top half of the jellyfish. Being as this is the top half, one has to repeat the process with the bottom half of the jellyfish. The process is practically the exact same, however the location, frames, and slot number change. However to be on the safe side, this should be what the ExAnimation Window looks like:
Now all that remains is the map16 setup, which is fairly simple. Just choose the individual tiles when editing a map16 tile, set what it is supposed to act like, and paste the tile. Make sure you save the map16 data after pasting the tile. In this case this is how mine was setup:
That's it, if all went well, one should have a working animated SMB3 Jellyfish. However, what if we wanted to something more complex, such as SMB3 Brick Block?
B) Pow Animation
Pow ExAnimation is very similar to what needs to be done with a standardized animation. The only difference is that you have two sets of frames to work with. For this example I will be working with the SMB3 Animated Brick Block Graphics
. The procedure is mainly the same, however the difference becomes apparent when setting up the frames. For this reason I will be skipping to this part.
Now when the pow trigger is set, it doesn't really matter if it is the blue or silver, one will notice a x2
beside the frames window (as seen by the red rectangle in the image to follow). The x2
indicates that one has two sets of frames to work with. In this case the two sets of frames are when the pow block is not pushed, and when it is pushed. What this means when filling in the window is that when setting the frames, half of the frames will be for the normal animation and the other half will be for when the pow block is pushed, and this is meant quite literally as well.
So, being as half of the frames are for the standard animation and the other half are for the pow animation, one has to setup the frames accordingly. Quite literally in that order, the normal animation will be first, and the pow animation will be second. One sets up the frames in the same way as they would for a standard animation, however one would keep in mind that one has two sets of frames to work with. In this case, the animated brick blocks, and the coin animation. With all this knowledge in mind, the frames should look something similar to this:
As you can see the first half of the frames are set for the animated brick block, and the other half is set for the coin animation. Of course this is the top half of the frames, meaning that the bottom half of the frames need to be set as well, which shouldn't be too difficult. Just remember that the same rule applies, this being that the first half is standard and the second half is pow activated.
Now before the window is closed, or okayed, one must input the amount of frames. In this case one does not input the total amount of frames, but rather half the amount of frames, in this case 4. In practice we are still inputting 8 frames, as there are 2 sets of frames, multiplied by 4 which is the amount of frames in each set. Simple math, that's all it is.
After this the process is the same. The map16 is added accordingly, and the blocks can be used in the level. The SMB3 brick block
has to be inputted to make it work properly, however that is beside the point2
C) On/Off ExAnimation
On/Off animations when considered to a very base are very similar to pow ExAnimations. They're the same in the fact that they both require double frame setting. The only difference is that the alternating frames are set for on and off, as if that wasn't surprising enough. The graphics set that I will be working with will be the Yoshi's Island Exclamation Point animated graphics set
. Why these are often used for On/Off blocks is beyond me. Anyways the basic setup up until the frames is the same, so we'll be skipping to that part.
Similar as to what is done when the pow trigger is set, the On/Off trigger will activate the x2
set of frames in which one has to set both parts of the animation. In this case what happens when the on/off switch is turned on and off. For on/off switch frame assembly, the on frames occupy the first half of the frames and the off frames occupy the second half of the frames. For this example the animated hollow and solid parts will represent the on and off, respectfully in that order. The locations of the hollow 8x8 tiles will be placed in the first four frames, while in the last four frames the solid animated frames will be used. Keep in mind that one will have to set both halves of the blocks as they are in an 8x8 line setup. Without much more jabber, and with the knowledge that On, goes before Off, when one copies the individual 8x8 tiles one's animated tile setup should be similar to this:
Again this is only the top half of the block and the map16 needs to be setup accordingly. Of course this is only one block, most likely one will have to do a second setup with the reversed frames in which the solid block is first and the outline is second. I should also note, yet again, that these are only animations, the correct ON/OFF blocks
have to be inserted to work.
5. Other Triggers
Aside from the standard triggers there are also other triggers that can be used in one's level. The majority of these are fairly self explanatory in the way one can setup an animation. For this portion I will be listing the other types of triggers and how it is that they work.
- Fairly self explanatory, the animation occurs when the player has collected a star.
- Once the timer is below 100 seconds the animation will occur. If for some reason the timer goes above 100 seconds (for example by collecting a green berry) the animation will stop.
Timer <100 One Shot
- The same process as the the other Timer <100, however with the exception that instead of the animation continually going, the animation will go through the frames once.
> = 5 Yoshi Coins
- When the player has collected all of the dragon coins the animation will activate.
> = 5 Yoshi Coins One Shot
- The same as the other 5 Yoshi Coin trigger with the exception that the animation will play once.
Precision Timer Palette Rotate
- I have never personally used this, however I can give some information on the subject. What is done with this form of trigger is that any animation that uses it will share the frame counter of first slot in the every group of eight (0-7 is one counter 8-F is the second counter etc). The usage of this trigger is associated with rotating palettes (explained later) and with creating faster animation speeds, or making the frame rate of an animation increase. For more information on this please refer to the Lunar Magic help file.
- This form of trigger is often used in tandem with custom blocks inserted into a Super Mario World rom. What is done with this trigger is that the frames will not standardly increase from frame to frame, instead a frame is manually changed in the asm file of the block. More information on this is explained in the Lunar Magic help file.
- This is another form of trigger that is often used in tandem with custom blocks inserted into a Super Mario World rom. The way in which this trigger operates is that it does not rely on predefined events such as the pow flag being set. Instead this works on predefined bits in the ram that when set will activate the appropriate frames. More information on this can be found in the Lunar Magic help file.
One Shot 00-1F
- This, again, is another form of trigger that is often used in tandem with custom blocks inserted into a Super Mario World rom. This trigger is similar to the custom trigger however with the exception that instead of doing a continuos animation the animation will be displayed once. More information on this can be found in the Lunar Magic help file.
How one uses these triggers is up to them as the possibilities are endless in how they can be used.
6. How to Set up a Palette ExAnimation
The final form of ExAnimation that I will be explaining is that of palette ExAnimation. Palette ExAnimation is basically the process by which a single palette or multiple palettes are animated to show two or more colours within a single colour location. For example the palette used by the top part of the land could be made to alternate between a red and blue palette, however the space occupied is that of a single palette. The way in which it can be used is fairly extensive; it can be used to make a colour go from lighter to darker, or create a waterfall effect, just to name a few. In this explanation of palette ExAnimation I will be explaining how it is that one can create the fake waterfall effect. The background I will be using for this example is that of the Yoshi's Island: Cave of the Mystery Maze background
. This particular background happens to feature a waterfall in it's background, making it the perfect candidate to use for palette ExAnimation.
The first thing, as ever, when doing any animation is to insert the graphics files. I've explained this quite often enough, however instead of inserting something to the ExAnimation files, one inserts everything, map16 and all, as one would setup a custom background. When everything is inserted and setup one should have a background that looks similar to this:
The background is correct and one can visibly see the colours for the waterfalls. Now keeping track of what these palettes look like, open up the palette editor. Look at where the custom palette is and identify where it is that the custom palette starts. Like one would in a standard 8x8 animation, place one's mouse over the tiles, that being the colours. When this happens one should see a various array of information regarding to that individual colour:
Pay close attention to the palette and color numbers and SNES RGB values as these will later be used for one's destination and frames later on. Without further ado, let's open up the ExAnimation Editor Window.
Now select a slot and choose a type. For this particular type one does not choose a graphics location such as 8x8 line, but rather one of the last animations, that being of the palette types at the bottom. For this example, choose the palette type3
. Now normally at this point one would choose a trigger however in this particular animation it is desired to have it running the entire time, therefore the trigger can be set to none.
Now remember the SNES RGB values that were pointed out previously? These will be now used in the frames portion. The frames are merely the colours by which the palette location switches from. Now by going over the the different palettes that one wants to go use, one will document those SNES RGB values and place them in their appropriate frame that is desired. Where the SNES RGB values are placed is often dictated by how the palettes are arranged in the palette editor and how many different palettes that one has to implement in the frames location. In this particular case there are only four palettes that need to be animated, each of which are in a line:
Now based on these colours that need to be animated, one hovers over each of these colours and places them in the frames section, one after the other, and in this case, in a right to left order (the water would go up if it was a left to right order). From this one should generate a frames box such as this:
As one would notice each of the SNES RGB values are implemented in the correct order with the correct values in place.
Now the last three things that need to be implemented are that of the frames, colors, as well as the destination. The frames should be fairly simple as one just counts the amount of colours that are being used to animate the single palette. In this case there are four. The Colors section is used in other forms of palette ExAnimation through the use of a number larger than 1. However since this is a simple animation one must implement 1 into this location; otherwise when one presses okay the animation will not be displayed, thus having to undo and redo the process.
The last thing that needs to be implemented is that of the destination. Now the destination is not that of a traditional 8x8 location, but rather that of a palette location. How is this implemented one may ask? Remember the palette number and color number that appeared when one hovered over a certain palette? These two values are implemented into the destination box. This is simply done by combining the two values together and placing them in the box. Not by adding or subtracting them, but rather through placing them side by side. To think of it in this sense, it is similar to that of a cartesian coordinate system in which one plots coordinates on a graph via the X and Y values. Think of the palette location and color locations as those X and Y values, in that order. In this particular example the location will be that of 38 (Palette Number 3 and Color Number 8). Once all the fields are put into place the window should appear as such:
Press okay and one should notice that the palette has now become animated, as one can notice it in the background. However this is only one palette, the other three still need to be animated. The process is still the same, however the frames of SNES RGB values "shift" in location in order to create the animated effect and the location changes to ensure that a different palette is being animated, as opposed to the same palette being animated again. With all this taken into consideration, the next animated frame should appear as such:
Notice how the frames shift to the left? This is what creates that animated effect. From this knowledge one should be able to easily create the third and fourth frames. (Cheat Sheet
if you can't figure it out.)
With all the frames correct and everything being okayed the background should now give the illusion of that of a waterfall. Congratulations! One has now created a successful palette animation. However the process in itself was fairly cumbersome, lengthily, and inefficient. The process can be shortened a fair amount to save time and rom space. The usage of this is done through the choosing of the other palette types, which will be explained in the next section.
7. Other Palette Types
Aside from a simple palette ExAnimation there are also eight other palette types that can be used in a level. The other eight are fairly simplistic in their usage and can easily save one time and rom space. The other eight ExAnimation types that one can choose from are as follows:
Palette + Working
- This is practically the same as the standard animation as previously explained however the difference is that the palette values are copied to the game's two inner copies in the RAM. As interesting as it is, this means that the SNES has to spend more time processing the data. This particular type would be useful if one is using a One Shot trigger and does not want the goal fade to revert the animated palettes to their original state. It could also be used in a manual frame trigger, so long as the animation is not continuos.
Palette + Working, Stop on Fade
- The same as the "Palette + Working" type however as the name implies, the animation will stop on the fade in/out when completing or exiting a level.
Palette Back Area Color
- Instead of animating a palette location, the back area palette is animated. In this way the Colors and Destination fields of the ExAnimation window are ignored.
Palette Back Area Color, Stop on Fade
- Similar to the "Palette Back Area Color" type however with the exception that the ExAnimation will stop on fade. Thus allowing the fade in/out routine to be properly executed.
Palette Rotate Left4
- This is a form of animation that will take a certain amount of colours and rotate them left, similar to what was done in the waterfall example. However in this way changes are undergone to the animation box for these specific palette types. The Colors field is now used to dictate the amount of colours to go over, or to apply the rotate animation to. To use the waterfall example, the amount placed in this field would be 4 as four colours are being animated.
The Destination field is now altered as it is to be used for the leftmost palette that is animated. The destination is compiled in the exact same way as a regular palette animation. In fact, it remains the same for all forms of palette animation. In the waterfall example the amount placed in this field would be that of 38.
The Frames field is also altered in how it behaves. Being as the Colors field already dictates the amount of colours that are to be animated, the frames area is used for the frame delay system. The amount that is entered in this field will cause the frames to run at nth the speed of the original frame. Where n is any value from 0x1-0x80. Placing a 1 in this field will mean that the animation will run at a normal speed. Which is convenient as this is the value that would be placed in the waterfall ExAnimation.
The frames part of the ExAnimation Window is ignored as the command is already given to rotate the palettes in the set way. There is no need to be setting a SNES RGB value for these frames as the palettes have technically been set.
This particular type is fairly useful as one can easily implement a palette animation that takes little to know time to set up, it also shouldn't take as much space in the rom. For those that are curious, this
is how the ExAnimation Window will appear if the above example were compiled into a rotating palette.
Palette Rotate Left, Reverse on Trigger
- The same as the "Palette Rotate Left", however when the trigger is set (pow, on/off etc.) the animation will move the opposite way. In other words instead of moving the palette left the colours would go right.
Palette Rotate Right
- The exact same as the "Palette Rotate Left", with the exception that the palettes are moved right instead of left.
Palette Rotate Right, Reverse on Trigger
- The same as the "Palette Rotate Right", with the exception that when the trigger is set the palettes are moved left instead of right.
Aside from block tiles and colours, is there anything else that can be ExAnimated?
Sprites also have the possibility to be ExAnimated, whether this is through it's palette or through the tiles themselves.
Is there any limit to the amount of animations that I can put in a level?
Yes, to a degree. The SNES can only handle so many animations at the same time. For this reason when too many animations have been entered, glitching in the animated graphics or slowdown can occur.
Help! My animation frames have screwed up and I'm seeing this odd tile that I never typed in my frames field.
Recheck your settings (type, trigger etc.) and ensure that all frames have been properly entered.
Help! My palette animation is only showing one frame and is not animating through all the palettes.
Were all the fields filled out before okaying the window? Try the animation again and double check the SNES RGB values to ensure they are indeed correct. Also ensure that all appropriate fields have been filled in before okaying the window.
How do you animate *insert ExGFX filename here*?
I, as well as other SMWC members, should not need to explain how to animate every file on site. This tutorial explains the basis of how to animate tiles given the desired trigger or graphics type and how they can be applied to other animated graphics sets. For this reason one should be able to apply their knowledge learned here to other files or problems. If there is a problem one is having with a certain graphics file, feel free to link or post it.
I have a question that has not been addressed in your F.A.Q., how can I reach you?
Do not PM me with questions regarding to this tutorial. Please post any problems, comments, or questions that you may have in this thread.
1Custom palette not included, a custom palette has to be made by one's self.
2Merely a download link, this is not a tutorial on how to insert custom blocks. Other tutorials can be found on SMWCentral.
3Not the most efficient way of completing a palette animation. The usage of a single animation is for the purposes of teaching the basics of palette ExAnimation.
4The Palette Types are not in this order in Lunar Magic. The order is only put in this way to easily explain, from the previous example, how a rotating palette works.