Original Post
I want to know generally, how do ppl handle AI states on two clients connected to the server?
1) Does the server run the AI and send data to the clients?
2) Does the clients run some AI and the other client runs the other AI and sends that data to the server?
3) Position + Velocity isn't good enough, what is generally sent? For example, if I have a character who jumps, I need to know the position, velocity and maybe the state it's in... AND I also need to know what animation to play (or where in the animation to play).
I'm worried about #3 the most. Let's say you have a bunch of 3d AI characters running around a room in a 2 player game. The AI characters have a ton of states, how do you keep them in sync between the clients? I can't think of how you would do that. If the AI decides to jump, the client games need to go into the right states. Is it merely I send a current state to the client and if it changes, I run the new state logic?
Thanks
Jeff.
1) Does the server run the AI and send data to the clients?
2) Does the clients run some AI and the other client runs the other AI and sends that data to the server?
3) Position + Velocity isn't good enough, what is generally sent? For example, if I have a character who jumps, I need to know the position, velocity and maybe the state it's in... AND I also need to know what animation to play (or where in the animation to play).
I'm worried about #3 the most. Let's say you have a bunch of 3d AI characters running around a room in a 2 player game. The AI characters have a ton of states, how do you keep them in sync between the clients? I can't think of how you would do that. If the AI decides to jump, the client games need to go into the right states. Is it merely I send a current state to the client and if it changes, I run the new state logic?
Thanks
Jeff.