SandsharkShark's Animation Troubleshooting Guide
#1
Fixing What's Broken

Hello friends! This guide came about because I've been fixing cosmetics for friends if they end up with broken or misaligned animation states and aren't sure how to fix them themselves. However those mistakes come about, broken states are very easy to miss in an initial pass of testing, especially if you don't have a levitation or true flight potion on hand (or if you can't test it ingame in the first place).

In this guide I'll try to explain how things work overall as well as a few of the edge-cases like rewound animations which will need some tweaking to work with movement states. I will give you the full length of each animation state in ticks (based on a known-good sprite), the pixel offset of each tick, and some examples of features you might need to enable or disable in Dream Maker to make certain animations work properly while moving.

If possible, always have a default weapon or armor piece on hand to check against. I usually test my animations against the Tome of Wisdom sprite since I used that ingame for a significant amount of time and know all the frames work. However, anything you're familiar with is fine, and the public sprite folder has quite a few great choices.

What are Overlays and Underlays?

Simply put, the Overlay is anything that renders OVER your character. The Underlay is anything that renders UNDER your character.

In practical terms, Overlays will most often contain the states where your character is facing upwards, as that is the only time your weapon will be universally rendered above all other items on your sprite. All other states are usually blank. The states you want will be labeled like so:

[Image: pqJCZ5k.png]

Underlays will contain all states where your item might be rendered beneath your sprite. In most cases these are all other frames and states. They will be displayed like so:

[Image: dWXH7L6.png]

However, some items are hidden from the sides. These might be missing those states unintentionally, or are simply not the right size or shape to be seen when a character is walking in those directions. In that case they will usually contain states in which the character is facing in a direction where the item can be seen, such as in this example:

[Image: OfyWiso.png]

What animations are there?

Generally, there are 16 animations you'll want to think about for a weapon, and 20 which should be considered for clothing, though the definition of "weapon" and "clothing" are certainly up to your interpretation. A Weapon item that's a pair of rocket boots might want to have all 20 animations and have all its frames overlaid. For now, we'll only be looking at the basic, most widely-applicable choices you'd be using. These are as follows:

For Armor and Gloves:
[Image: NKnlo2c.png]

For Weapons:
[Image: VF83LqL.png]

"Okay, but how do I fix them?"

Excellent question! Well, first you need to identify what's broken. I tend to find the most issues with walk (M), run (M), and float. I'll only be covering these for the sake of brevity.
[Image: K8T69ii.png]

The (M) stands for Movement. These are Movement States. When you double-click on the name of a State, this menu will appear and you can choose whether states are for movement or not. run and run (M) are differentiated by their movement property. "run" is the animation that plays when you hit R on the keyboard, while "run (M)" is played only while you are actually moving (you can potentially use this behavior to do some animation-activation tricks, if you want to toggle an effect on and off).

[Image: 8DzH8c7.png]

Let me momentarily go over both Movement States, to illustrate how problems emerge and how to fix them.

Walk cycles tend to be multiples of 4 frames, with a standard non-animated weapon being 4 frames lasting 2 ticks each.

In the first frame, the weapon is in its default position. For now we will call this Centered, though sprites can be off-center or in various other places if you want them to appear off-center on your character. For the second frame, the weapon is one pixel DOWN from Center. This alternation continues, with the third moving back to Center and the fourth going down again.
[Image: 52y5v7q.png]

Run cycles tend to be 4 frames total, with each frame being 1 tick. The first frame is Centered. The last 3 frames are one pixel UP from Center.
[Image: MUqgZGx.png]

Float cycles are not a movement state. They apply when you're floating whether you move or not. Floating is most often a cycle of 2 frames lasting 4 ticks each. Importantly, Float is the opposite of Walk in terms of its animation, in that the first 4 ticks of the cycle are Centered but the next 4 ticks are one pixel UP from Center.

The example below is of a sprite currently used ingame (the version most people have is broken while floating and does not move at all!) which I fixed several months ago for Chaska's signature outfit.
[Image: D8w0OPw.png]

Double-clicking on the number above the frame will let you change how many ticks it lasts. To move sprites around, tapping the arrow key once will move the selected frame's sprite one pixel in that direction, making alterations to fit the correct animation very easy.

An animated weapon which plays at the same speed across all its states needs some alteration to this recipe. What you should try to do is make sure that the animation has a multiple of the original number of ticks used in the default animation for that state. Run animations and Walk animations should be multiples of 4, while float animations should be multiples of 8. Since the animation cycle is looped, as long as you have the correct movements and frame timings your animation should synchronize properly.

To give you an example, this is the Walk cycle for a weapon I'm doing some animation touch-up on as I write this guide. This is a complex animation because it plays at 1 tick per frame, and also because the animation has the Rewind flag set on all its freestanding animations.
[Image: x9UckV2.png]

The Rewind flag makes the animation play once forward, then once backward starting from the last frame before repeating again. Using this in a walk cycle can cause the animation to go out of sync with the walking character, so what I did in this case is manually add frames in the opposite order in a multiple of the original walk cycle.

The first two frames are centered, then alternate 2 lowered and 2 centered, 2 lowered and 2 centered, until the animation ends to satisfy the 2-tick centered 2-tick lowered animation of a walking character. Expanding the length to 16 frames is not necessarily needed vs. 12, which should also be a valid number in this case, but it seems to look better that way. Pick whatever appears most pleasing in the preview.

Note also that the Rewind flag is set to off. To make my job easier I copied the standing run animation to get all the necessary frames in one go, and copying animations brings along their settings too. Make sure you have all of the settings turned to the ones you want if you copy something from elsewhere.
[Image: TwbNLPu.png]

Conclusion

If there's anything missing from this guide or if I got anything fundamental wrong just tell me and I'll make some changes. I'm mostly reverse-engineering this stuff from existing sprites, and even though it seems to work for me there are plenty of things I don't know on the topic.

On that same note, this process can involve some trial and error with complex animations. Don't be afraid to ask for help, either by talking to a spriter and getting their opinion on your work or getting a patron or an admin to help you test out the weapon or clothing item before it hits the streets. Sometimes you can only figure out what issues you're having by seeing them happen ingame.

Finally, thanks to Apollo Densin for giving me a ton of good sprites when I started playing, which helped me learn how this all worked in the first place. Thanks also to Avajain, Sebb, MommyAlien, Quatral, and anyone else I'm forgetting, who have been patient with my attempts to figure out animations, either by letting me mess with the ones they made or helping me with getting sprites applied so I could see them working ingame.
Reply
Topic Options
Forum Jump:




Users browsing this thread: 1 Guest(s)