Hello,
I am new to multiplayer programming and have a question about using behavior trees. I've read a forum post, that said you should run the behavior tree on the server and only update the position/animations etc. to the clients. This makes sense to me, but I can't imagine yet, how this should be done. What would the client version of the npc look like/what components does it have? My original approach would have been to have the same behavior tree running on each client and then, when e.g. the health of it changes, I send an rpc to all clients to change the variable of the local behavior tree. I don't really understand, how I can have a copy of the npc, for each client, without running the actual behavior tree. I hope this explains the problem.
Thanks!
I am new to multiplayer programming and have a question about using behavior trees. I've read a forum post, that said you should run the behavior tree on the server and only update the position/animations etc. to the clients. This makes sense to me, but I can't imagine yet, how this should be done. What would the client version of the npc look like/what components does it have? My original approach would have been to have the same behavior tree running on each client and then, when e.g. the health of it changes, I send an rpc to all clients to change the variable of the local behavior tree. I don't really understand, how I can have a copy of the npc, for each client, without running the actual behavior tree. I hope this explains the problem.
Thanks!