Object Oriented Replication (need advice)

Yep it’s possible.

I think a better option than Objects is to use ECS which is basically in my words objects but modular and more component based. Here is my code based example for a status system, however keep in mind this is just one method and you could create your own similar system like others have done with ECS as long you go Component-Based.

Plus this makes it easier in my opinion to seperate what should be a client system, server system, or perhaps shared and you can just drag and drop the system modules to where they belong in the future.

To go more concrete.

For this you can just use Instances and pass the reference around as they have a unique ID guranteed by roblox system. No need to use Http:GenerateGUID() and stuff or an incremental ID system 1,2,3,4, … .

image

For the same Instance ID, you can generate one client object and one server object which you will have to do anyway as client and server is seperate.

Replication between these two objects such as server sided unique properties, or client sided unique properties will be completely up to you and as viable as you can make it.

3 Likes