Jump to content
  • Advertisement
Sign in to follow this  
supagu

best way to do this....

This topic is 4353 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!