What's the best way to handle animations in general with a large project?

I’ve recently been delving into a bit of research into animations and how they should be handled, and I’ve come out rather confused on a few things. The way people handle their animations seems to be sort of all over the place. From what I’ve gathered the “best” method seems to be using a storage medium of sorts for either the ids, or animation instances themselves, and then loading them outside of any repeating code to prevent repetition.

During some of my own tinkering and close discussions, I found that if you actually use an animation instance, and change its id after it has been loaded it will play a different animation. This led me to be even more confused about the entirety of animation handling.

I’m mainly looking for either some direct help, or pointing to resources that I missed regarding handling animations. The majority of my experience and potential use of animations stem from projects consisting of combat. Which can require many unique animations for a lot of different scenarios. So, because of this I want to figure out what the best method for storing/loading/handling your animations is.

Any help is greatly appreciated, as I have very limited knowledge of the subject myself, and my research attempts have been mostly in vain.

4 Likes

Have you tried a search.
I just did a search and got this

1 Like

I actually did run into this post, but this isn’t quite what I was referring to. It’s great reference that I use every so often when I’m actually animating. But what I’m looking for specifically is actually handling the animations with their implementation. Things like how to efficiently handle loads of animations, in both their initial storage, loading, and actual playing, via animation handling systems.

Most of this is probably common sense I’d imagine, but I really want to make sure I’m doing things right before I start putting more time into getting some of my projects into development.

6 Likes

I would recommend either you store all your animations in ReplicatedStorage, or store them as per item that uses them (if your game has tools, then have the script simply load the animation by hum:LoadAnimation(script.Parent.Animation).

Either one works, but if your game has it’s own item system where there is no ‘tool’ or any other object parented to the player or character, it may be best to load from RepStorage.

4 Likes

That’s generally the method I’ve seen used by others, and that I use myself. I’m curious as to whether or not there is really any performance impact differences between storing animations via ReplicatedStorage or an in an array (by in an array I am referring to keeping a string/integer of the id for said animation) per script/module that requires said animation.

Also, another thing I’ve been trying to figure out with this post is if it’s a better idea to load all animations on the humanoid’s animation controller at once. (Implying there’s a very high chance said animations will be used by most players), or if it’s better to load them on a sort of need to case. (Ie, player hasn’t actually done said action, so said corresponding animation doesn’t need to be loaded beforehand)

8 Likes