Currently working on a turn-based fighting game. When spawning enemies in and using meshes in animations, I have two ideas:
-
Cache enemy models that will be used in the battle and meshes in replicated storage, so the client can easily clone them. Use a remote event to tell the client when and what to clone.
-
Just store everything in Server Storage and parent a clone into the workspace whenever needed/send a remote with the objects in it.
What is more efficient?
On one hand, I’m worried about client memory usage, which I can see is an issue with #1. However, hopefully the amount of cached objects is optimized enough because only the necessary objects are cached. There should not be any bloat at all.
#2 I feel is a lot more data heavy, but saves on a lot of memory. I’m only worried that a laggy player or heavier background calculations may have perceived input lag. (player → server does stuff → player)
Thanks!