Sign in to follow this  

Want to add multiplayer.

This topic is 2647 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

I have partially created a game and my next step is to add multiplayer. How would i go about learning to add multiplayer to my game.

Thanks.

Share this post


Link to post
Share on other sites
I would suggest learning about winsock to start with. There is quite a few articles on gamedev that should allow you to get going. Here is a link to articles relating to MP.

Share this post


Link to post
Share on other sites
Pick up a networking library like RakNet. Then go into your code and decide what things need to be updated over the network.

Try to first look at it in terms of commands (attack/move/ect.). If you keep both computer's simulations in sync, then sending commands will reduce the amount of network messages.

Next, look at everything that isn't viable to send as a command (ie position in an FPS), and send delta-compressed updates of that data out to the other computers.

Share this post


Link to post
Share on other sites
I very recently had to add multiplayer features to a single player game, and I did it within a rather short timeframe (10 weeks, with other schoolwork to deal with at the same time). Granted, I had some knowledge before I started, and I've been programming for years, but I found Sirisian's articles to be very helpful. I recommend trying them out yourself!

Here's one of his articles. There might be more...

If this is too basic, or too advanced, say so, that we may better assist you!

Edit: fixed mis-link. I blame copy and paste.

If you're curious, I had accidentally put the link to the announcement thread for my own multiplayer game. I was probably link-spamming it.

[Edited by - Aken H Bosch on October 10, 2010 10:38:25 PM]

Share this post


Link to post
Share on other sites
Hey, I bet a lot of people have the problem that they're starting out in network programming, and they don't know what to do. I bet there are some questions that are asked quite frequently because of that!

If only someone went through the trouble to answer all those questions with links and references, and put all those answers in one place, wouldn't that be great? If only...

Oh, wait, I've got it! Isn't that what the Forum FAQ is for?

:-)

Share this post


Link to post
Share on other sites

This topic is 2647 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.

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