NOTE: I’m unsure where this topic should go.
It can either be in #help-and-feedback:creations-feedback or #resources:community-resources as far as im concerned, help would be appreciated.
Recently, I have been trying to fix old broken scripts that were effected by FilteringEnabled
, and while playing around with scripts that I fixed, I thought It would be nice to fix the old Animator before animations existed, and to otherwise optimize it, and remove some unessecary, or no longer used methods of animation.
While this isn’t the most important thing to ever exist in the whole wide world, I thought It would be cool to share for the 2 people who are interested, and want to know about this, despite it (to me at least) being pretty simple. And while I dont cover every detail about it, im mainly covering just how it works, and its result, which I think I have accomplished what I was trying to do.
What is FilteringEnabled
?
FilteringEnabled
was an old feature that allowed for client changes to replicate to the server. This was around since the early days or roblox until it was removed in 2018 to prevent exploits that otherwised absued this form of replication. as a result of this change, LocalScripts that once replicated to the server would no longer do that, not only working on the players computer, thus breaking millions of games at the time, including this script.
What does this “fix” do?
As script only uses the client, it wont be able to make any changes to the Server, so in order to have this affect everyone else, it needs to be to be able to work on every player, so I had to modify the code to run a loop, and to be able to apply changes to the other characters using said for loop by making the functions use their character instead of the players own character.
The fix I did also optimizes, and shortens the code. The original code has 248 lines, while with what I did, managed to reduce it down to 128 lines of code.
I also ended up adding the feature to set a limit of how many updates there should be per second, where its able to reduce how many times it has to run each time.
As a result, I ended up getting this, which I feel replicates the animations perfectly:
In the video, the animations updates 10 times each second, it is still smooth and works pretty well for old roblox, but if I were change it to work without it, it would be really smooth. But to me it doesnt need to be too smooth to the point where it can end up slowing down the game.
This is the best solution?
No, there are plenty of more things I could add to otherwise fix, or replicate the original experience, because as far as im concerned, physics from the server wont be as accurate, due to this only being done on the client. Another thing is that all forms of movement are in sync, one example being if you and another person were to walk to one area, both animations will move exactly the same.
Is this a bad thing? No, not really, but it can be infurriating to the person in the back who wants a async experience. However it can be an easy fix that I will have to work on later on.
General Questions, and Statements I think people might say.
“Animations replicate to the server, use those.”
Animations can for sure replicate this effect to the server, and at some point I can probably do that with this if I can get everything correct, but the main idea with this to just have the original code (albeit optimized and reduced) work with all players as opposed to just one player.
“More players can cause this to lag.”
Also true, but with the ability to slow down how many times it updates, I feel like it can help mitigate that, not to mention after testing a bit of around 50 players (to clarify here, a bunch of NPC’s on the server moving around with the animator affecting them), it would run around less than a few milliseconds. Considering that 144 frames run at around 6 milliseconds, I dont think it currently needs that much more unless people want that.
“Why not use the Server?”
The Server is a very important thing that should only be used if you are doing important calulations. The Client in the majority of cases is to be used for VFX and the graphics portion of the game, as if you were to use the Server for this, it will slow down, and end up giving you a bad experience within your game. Because this is a visual detail for the game to feel more alive, it would be best for it to remain on the client, as to not burden the server with any information.
“Recommended Update Speed?”
The recommended update speed in my testing should be at least 10 - 15 FPS (or 10 - 15 updates per second), as it will give you the bare minimum of its smooth animation, you can of course set it to however you want it to be, but you wouldn’t want to set it at a speed at makes it look unpleasant or cause any performance issues.
“Will there be more features?”
Sure, if it makes the basic system better to use and is faithful to the original animation, but as if right now its mostly finished, other than a few inconsistences here and there needed to be patched.
“You’re a genius for this!!”
I really am not, as far as im concerned I had a few hours of nothing to do, and wanted to do something fun with old code and share it with people to see. Not to mention this in terms of everything else I can do is fairly mild in comparasion.
“Why did you make this?”
Just thought it would be fun…
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
0 voters