Which Network Library to Use?

Started by
2 comments, last by Hodgman 14 years, 4 months ago
I want to add networking to my game for 2 player games and a score board. I am a C++ programmer so i want to learn a library that will be a good skill to have when i start looking for a job. I want the library to be cross platform as i plan on developing my game to be cross platform. The game will have a real-time part as well as a turn-based part. Any recommendations?
Advertisement
If your working in a windows environment start by using Winsock, its not cross platform but it's very well documented and will provide you with a very good foundation.

Here's how I would advise you start learning:

- Create a simple lobby using TCP/IP that players can join and leave.
- Once the lobby is full start the game and switch to UDP for the main game. You could probably use TCP for any turn based game but you should use UDP for anything more complex. There is a plethora of information available online about their differences.

Hope this helps
Thanks. I did some reading into RakNet and that is the one i am going to go with. It seems pretty straight forward after reading the sample code.
Yeah RakNet comes with a lot of examples of how to solve lots of different problems with it. It's a pretty comprehensive package.

IIRC, it uses UDP for everything, but allows you to use TCP-like features, like reliable packets if you need them.

This topic is closed to new replies.

Advertisement