nice one. I assume the biggest downside of using animations compared to other methods would be the memory, right? because it stores the whole animation data inside the memory. I was wondering how significant that memory bump would be if we kept using animations for basic tasks such as this one
I don't think it would be that significant its only a list of CFrames with a number representing time and names to know what part to move plus things like numbers to know what easing style to use etc.. in this video we only used 4 CFrames, 4 numbers for time and 1 name/string 1 CFrame might use around 48 bytes / 1 number might use around 8 bytes / and strings might use around 1 byte per character 50 cframes might use around 2400 bytes = 0.0024MB but this is just hypothetical it could use more I have not tested but memory usage is not something you should really shy away from using, the hole point of memory is to use it to improve performance for instance if you had a choice of generating 1000 CFrames every frame or caching 1000 CFrames in a table and reusing the 1000 CFrames every frame it would be better to cache the 1000 CFrames and reuse them every frame instead of generating 1000 new CFrames every frame this is because CPU is a more valuable resource then memory Also remember that memory used is better then memory that is not used this is why windows has things like SuperFetch in order to fill your memory so that your memory is not going to waste
@@5uphi Thank you for explaining it nicely. I was also thinking that way. But one small question about your comment, Is this memory usage going to badly affect Roblox mobile players (who play on low end mobile devices with little amount of RAM and storage). Because Roblox is something that has a huge mobile user base. Or is it not that of a problem for them but rather an advantage, because we're using less processing power by using those extra bytes of memory?
Most mobile devices should have at least 4GB of RAM so I think it would require hundreds of thousands of animations to fill that up also if you use content streaming it should allow animations far away to be unloaded from memory also if you reuse the same animation it might not use any extra memory but I have not tested this so im not sure
That was an excellent tutorial, lots of useful bits! At the start I was all, why not use hinges and a spring? And then boom you did a physics door! Lots of ideas on connecting functions and events to animations. The bench marking was such a nice touch too.
What a great show! I was wondering how making choices between thoses way to make part evenbt, but i didnt expected a huge difference like that. ty man!
The performance benchmarking portion was awesome! How would tweening perform if utilizing something like BetterTween and having the client-side perform the tweens? I assume CPU usage would stay the same but network would only have spikes for when the tween information is first sent?
only 1 thing left to do, make a tutorial on how to make the humanoid rootpart follow the expected position while in the animation. because for now when you use and animation, the body moves but the humanoid root part stays in place, and after the animation ends it just brings the player back to the humanoidrootpart cframe
one way is to blend animation with physics/tween/cframe/etc... so for instance if you want a dash animation you make the animation so that the character stays in the same position then you move the character with physics/tween/cframe/etc... and play the animation at the same time
Could you also use Tweens but on the client and have the server tell the clients when to do it with a RemoteEvent? I feel like AnimationContollers have special engine-side capabilities that make it so the motors are moved very efficiently (maybe no Changed connections, but I'm not entirely certain) and far away motors will be throttled to run at a lower framerate.
since animations clearly are the most efficient way of making things move, is there some sort of way that we can get players to move with the object like they can with physics? Edit: I presume some sort of proximity check will be needed so that it's not trying to move the character if they are not nearby?
Right you will need to do a raycast to detect the floor then update the character based on how much the floor moves Another way is to set the velocity of the part that is animating but if your setting the velocity every frame at this point it might be better to use physics
if one of the 2 parts is physics based that part will detect the touch, the same way a unanchored part can touch a anchored part the unanchored part is responsible of detecting the touch