Questions about networking and open source networking libraries.

Started by
2 comments, last by grill8 14 years, 6 months ago
Hello, I have some questions about networking and open source networking libraries. I am currently designing a 3D game engine and need to implement networking for it. I found Boost.Asio online and it appears to be a good open source networking library from what I heard and read about it. Question 1) Is Boost.Asio a good route to go for open source networking? People seem to swear by boost in general. Ok, so I am new to networking programming. It is my understanding that UDP is the way to go for games since (if I recall correctly it has been a long time) TCP is slower although more reliable. Question 2) Should I use UDP for my 3D game networking? Question 3) What is the difference between synchronous and asynchronous networking, and which would you recommend for a 3D game engine? Question 4) Are there any tips/suggestions you would recommend for a newbie networking programmer to know during design/implementation of a 3D game engine networking solution? Thank you for your help. Jeremy
Advertisement
Boost.asio is a very decent library, although the reactor paradigm can take a bit of getting used to if you aren't familiar with it.

However, you should keep in mind that a game-oriented library such as RakNet will provide explicit support for essential services such as reliable messages, flow/congestion control, object/attribute replication, remote procedure invocation, etc.

If you choose to go with Boost.asio, you are going to have to roll all of these on your own, and believe me when I say that a robust implementation of all of these features is far from trivial [smile]

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I personally like ENet, which provides many of the features you want in a UDP library, but nothing more. RakNet is great, but it's like the swiss army knife of networking - it's got everything bar the kitchen sink (coming in the next version [wink]).

My only wish was that ENet had NAT punchthrough functionality, which can be tricky to do...

Boost.Asio is good for high-performance networking (e.g. if you're doing a server) but for games, the additional functionality provided by ENet/RakNet is invaluable. That's been my experience anyway.
Thank you very much for your help.

That definately points me in the right direction.

I appreciate it.

Jeremy

This topic is closed to new replies.

Advertisement