But that is the only place where you use the function so why not just handle everything in the same place?
And the Easing module had so much unnecessary parts to it
Besides Why would you need to create an entirely new module just for it to be used once?
“Even if the smoothing function is currently used only in one place, this does not mean that it will always be like this. That is why it is important to follow the principles of good design, such as the principle of openness/closeness (OCP) and the principle of sole responsibility (SRP)”
That’s what one person told me, I think he’s right. In general, if performance does not suffer, then of course I will give my voice in favor of readability, even if it requires more lines of code.
In general, for me personally, it is just convenient to adhere to all the principles at once, and not just some. Well, like, it’s more convenient this way
Didn’t you just say readability was second? And besides, where did you get the “performance does not suffer” part? Did you make a benchmark?
Because it just can’t suffer.
The cost of importing and calling functions from another module is negligible, literally, the memory cost for this is no more than that of some “print” function. I’m sorry I didn’t answer right away, I had trouble articulating my thoughts.
–
Metatables suck… You might observe that I try pretty… | by Elttob | Medium
This might be helpful
Maybe you’re right. But link is not loading, XD
Tonight I will work on the possibility of “creating plugins” And actually creating them. The first thing I’ll do is add a Pause and Resume function. Why in the form of a plugin? I don’t want to clog up my module with unnecessary functions. (Still, my module is intended to completely repeat the work of the official animator, and not add its own functions)
I tried to do rootMotion recently, but failed because I didn’t understand how to implement it at all
I don’t think you should make root motion by yourself. Simply, motors6d already exist. All you need is just apply tweens on the C0 of a specific motor depending on the keyframePoint (or how is it called). Motors6D already have root motions. Why reinvent the wheel then?
Either I didn’t understand you, or you misunderstood me. RootMotion = track the humanoidroot at the moment of animation. (There are many uses for this)
does it support Animation Event
Yes, I just fixed the function:GetMarkerReachedSignal, it returns the Value of the marker.
Also, I actually added this signal in the typing so that there would be hints.
This is a great module and I am really excited to use it. I attempted to implement it into my game and I keep getting this error
and im not entirely sure why. Do you think you have any solutions or fixes?
I’m working on a solution to the problem.
I’m not sure if the problem that @ceat_ceat was talking about is the same as the one I was having, but I tried out the module that they provided and it seemed to work completely fine.
Good Module.
I made something similar to this, and one of the key problems I faced when storing massive amount of Keyframes was this: Load Times.
Studio (and Game) load times would absolutely skyrocket due to all the Keyframes that would take up all of the Instance space up. (You can reach thousands of megabytes if you are not careful).
What I would recommend you do in order to address this problem is by creating another format that is a more compressed format of Keyframes and Poses for game use (saved as multiple StringValues called “Chunks”)
Using buffer
s and helper modules like BufferUtil to make using buffers nicer.
(OR, and this might be easier)
Turning all Keyframes and Poses into JSON and Compressing it down using This String Compressor
(Uncompressing it when reading)
If you go with any of these paths, just remember that Roblox caps all String Properties to 200,000. so you’ll need to split your exported compressed animation each 200,000 nth string and order them as “Chunks of Animations”
This is a good module but i dont know why does the animation not play a second time after it has ended? (The “Activated” print still prints but no animation)
why would you ever do that with strings?
You would legit waste resources for no reason. “Making it harder and worse just to waste resources on fixing it” about buffers i think that a good idea.
Storing millions of Keyframe/Pose Instances currently is extremely bad for loading times and memory (Animations can take THOUSANDS of KB if not careful with Poses). Baking them to be compressed strings OR buffers for Game-Use is the way to go. Buffers are stored as strings too anyways.
Using buffers will force you to fully rescript this module as well and will make you be forced to script “prediction” of needed data in buffer. (getting the length of an animation and then getting a possible range of where data could be in buffer to not go through all lists)
Your suggesting about strings makes absolutely no sense to me because it in fact doesn’t make any sense