Curiosity about how to make remote which is optimized, compatable and more for class

I’m a young developer working on Roblox.
I just used an old roblox remote system
and kaboom. remote events might be worked well (for only one class per player) but remote functions are not.

At this time, I’ve tried some ways to work well.
The way is to make a custom class for remotes but it makes entire new remotes per class ‘Instance’. It worked well but it does not look optimizable. Even It is looked wasted.

so is there a way to send data with Server-Client Communication as Optimized Readable and Compatible? Thanks.

1 Like

If you wanted, you could just use one Remote Event for everything, it’ll lower just the tiniest bit of memory, but it’s good to use multiple for organization. Sending information from the server-client and vice versa is already optimized as it is, because all you’re sending is less than a kilobyte of memory (I don’t understand memory that well but I’m pretty sure you’re sending much lower than a kilobyte). Just optimize things by doing a variable for script.Parent called “sp,” make variables, functions, or module scripts for objects that repeat twice.

Btw, for module scripts, only use them if you’re scripting in OOP style or if the same function is repeated in two or more scripts.

As posted on the original context. Remote function problem still exists. Remote event is might possible for class (I already made class id thing) but remote function.

There is no possible way to merge all remote functions. (At least i know) and is even not looking optimized.
Is there another way?

1 Like

There’s not really any reason to merge all remote functions. But to do this, you just give the event tags like, “weapon,” “item,” or “armor.” You just do an if statement for each tag and paste in their events. I do suggest to use multiple remote functions and remote events because it’ll keep things in your code organized.

Then, You’re saying just use making a new event, function per new class ‘Instance’? I just worried about a huge amount of remote generating (it might takes a thousand as a max amount (few hundreds might be average))
Because there IS an optimized model in Roblox? If then, I’ll use my custom remote module and That will be a conclusion

There are things like Knit and BridgeNet which might be of use to you.

Knit:
https://sleitnick.github.io/Knit/

BridgeNet:

1 Like

It is optimized and looking good. But It focuses on Single Server-Client Connection Not Class(Server) To Class(Client). It could be utilizable to make it into Class-Class Remote. However, I have to build my own framework and It is not looking editable(It takes so many times).

So Then, Is there any theory about optimizing or some information for making a simple and good remote? please leave a comment about it. Thanks.