#I do have another question about structure of game logic.
1 messages · Page 1 of 1 (latest)
honestly, the easiest way is to just not separate them. If you are using RPCs they have to both exist on client and server anyways. I suppose you could use Custom Message Handlers instead of RPCs if you really, really need them separate.
right
I'll send a screenshot of what I've currently done
this is my interface between the two
when a SeverGameLogic is created on server or host, it sets the serverGameLogic in the interface
and a clientlogic when on the client
so whenever a serverRpc is executed it has a reference to the server logic
and if a clientRpc is executed it has a reference to a client
but then the server logic never exists on the client and client never on a server
I guess it is a bit bloated, as I basically have to forward any rpcs
but I feel like it makes a clear distinction between the sever and client which is helpful and makes sure client only knows what it needs to?
This is the clientside where I'm sending a test msg
Clients will need a reference to ServerLogic there
why?
or the server will need ClientLogic
Where is that ServerRPC defined?
In the InterfaceGameLogic
ah ok. that works
And like that you can send a message to the client
a bit over engineered for my tastes. But if it works, it works
not really. even the Unity Boss Room sample kinda gave up on that
Right
I think I'd probably get confused if they were in the same place
this is my first multiplayer game
So I think keeping them separate, even if over engineered, will probably serve to my advantage
If it helps you out, there are no wrong answers
kk thanks for the help