Sign in to follow this  
supagu

best way to do this....

Recommended Posts

right so im setting up my game to work multiplayer. what i have is a controller class, which handles all input (im making an fps fyi), this controller class also has a pointer to my actor class. when i press the use button the pawn will check the controller to see if it was pressed on the next update, this will cause the actor to broadcast a message around to look for anything that is useable. When you are using an object, the object being used has access to the controller, so lets say im running around, then i use a cannon in the environment. Now the cannon uses the controller to move, aim fire... how im wondering the best way to get this working multiplayer. My initial idea was to have the controller handle all network code, currently this is just sending the actors player position over the network. I've a few ideas about how to go about this: 1. move the network code out of the controller in to each class that needs to do its buisness. eg. actor sends its own movement state, cannons send thier own rotation states etc.. 2. controller now needs to know about what the actor is using and some how replicate the appropriate info. any other ideas or comments on which approach would be better?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this