I am trying to make a rainbow animation effect across multiple objects in my game, this includes pets and GUI. As there may be hundreds or potentially thousands of these rainbow effects happening at once, what would be the best way to implement this?
I have thought of 2 solutions but I’m not sure how they would do performance wise. The first would be using collection service and tagging all rainbow items in the game then looping through them all individually applying the rainbow effect.
The next idea was to have a single Color3Value which I apply the rainbow effect to, then using that value on a .Changed event to apply to all rainbow objects.
Again, I’m not sure if these would heavily impact performance due to there being so many objects to apply this to, or if there is a better way to do this please let me know!
This would most definitely impact your game’s performance severely. I wouldn’t recommend it, however if you must, I’d maybe try Content Streaming or not applying the effect to other client’s pets.
Any ideas how pet simulator x does this without the noticeable hit to performance? Especially as at times they have thousands of individual objects to apply the rainbow effect to.
I’m not sure. But you can tell when the game is lagging. For example, if you look at the pet index and scroll down, it’ll noticeably start lagging (due to the amount of imagelabels in the scrolling frame).
Yeah I do notice the index lagging but I’m sure that’s primarily from the image labels and not the rainbow effect as if you have 0 pets in the index it still lags without a single rainbow effect occurring.
In theory If theres some way to link all color values of rainbow objects to a single color3value without having to use a .Changed event that could work? However I’m not sure if thats possible.
You could use a module and loop thru all the parts you want to give a rainbow effect to [and do it]. However even with the lack of scripts the rainbow effect will probably still decrease performance in your game.