• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


30 Nov, 2024

Updated at 02 Dec, 2024

Attempting to create a "Client-side InsertService"... is this idea sound?

Hey DevForumers;

I’m in the process of optimizing the memory usage for my game. The biggest pain-point right now is client-side memory usage via replicated instances. To combat this, I’ve done some research into effective ways to replicate instances selectively (in essence, a sort-of client-side InsertService.)

I have a list of requirements that I want this system to fulfill, some pseudocode, and a prototype. I’ve done some light testing with this prototype, but not enough to be confident that this system will fulfill all the requirements. (particularly with freeing the memory used by the replicated instances.) So I figure I’d ask about it here!

So my main question is: Does my design meet my requirements? Are there any pitfalls or concerns with this design? Is there any way I can improve it?

Pseudocode

Server (click for more details) Client (click for more details)

Requirements

  • Instances are able to be replicated to individual players.
  • The integrity of replicated instances should be perfect (it should not be possible for instances to somehow be “half-replicated” or corrupted in some way)
  • Instances are replicated to players without the use of :Clone()
  • Instances should be able to be freed from memory if not in use
  • Should not be abusable or prone to exploits.
  • Should be performant and efficient.
  • Should be capable of replicating very large instance trees if needed (on the order of 30k+ instances) without a noticeable performance hit for other players.

Prototype

asset-replication-test.rbxl (7.1 KB)

1 post - 1 participant

Read full topic