I'm thinking about how should I approach some issues in my project.
Let's say we are building an RTS with netcode for entities.
Feature wise :
2 players are buildings stuff on a moving plateform ( not necessarely the same )
Some buildings extracts ressources , some transform them ( let's ignore the transport for example sake )
How should the code be organized in that context ?
My first thought would be :
Inputs from the players ( building something at that position , destroying something etc ... ) , should be send as rpc command from client to the server that then apply the command on his side.
If we have a factory producing stuff, that calculation should be made on the server & then send as snapshot to the clients so they can have that sync on their side.
Cheating is not a concern.
I'm trying to keep things as simple as possible.
Now I'm not sure how to say to netcode a few things :
Problem A :
On this building entity that is spawned from a prefab.
Sync the data of the production from the server -> updated by systems that execute only on the server.
Do not sync anything physics related ( cause not needed in my context )
Do not need to sync positions ( Maybe ? or should I just do the update of the localtransform on the server then let it replicate ? )
Do not need to sync visuals ( cause that should be only on the client , right ? )
Should I just not bother and sync everything on the entity ?
How to setup the entity properly so only relevant data are synced. ( I'm aware of the ghost authoring component but that sync everything and i'm thinking that's it's overkill for my usecase )