Skip to main content
GameDev.net gamedev.net
🔒 Locked

Multiplayer for building game

Started by coderWalker Jan 8, 2012 at 3:43 AM 4 replies 2.4k views
Original Post
coderWalker
coderWalker
I am working on a 3d fps building game utilizing voxels with a visual style similar to Minecraft.
water.png

I am now at the point where I want to add online play to the game.

Does anyone recommend any C++ Networking libraries that would help with this?
These libraries must work with Windows, Linux and Mac at least.

I stumbled upon the boost.asio library today. Does anyone have any opinion on this library specifically?

How this will work:
One computer will be the server and all other clients.
When they request a change in the world the request will be sent to the server the world will be modified and then
a packet or message will be sent to the clients telling them of the change so their local copies of the world
will change.
Player positions will be sent every couple milliseconds.

Is there anything about the method that could be improved as well?
If this post was helpful please +1 or like it !

Webstrand
hplus0603
hplus0603
Boost ASIO is a fine general purpose multi-threaded cross-platform networking library. It doesn't give any higher-level structure, though -- no game entity model, event bus, etc.
Other libraries to look at may include Enet (needs light porting for Windows) or RakNet (don't know how the free version works on Linux.)
enum Bool { True, False, FileNotFound };
coderWalker
coderWalker
Would ASIO be sufficient, and do you know of any good tutorials for it besides the ones on Boost's website?
If this post was helpful please +1 or like it !

Webstrand
hplus0603
hplus0603
ASIO is sufficient to build a great game and server, yes. I don't know of tutorials other than those on the ASIO site, but I think those are pretty great!
enum Bool { True, False, FileNotFound };
Johan!
Johan!
I recommend that you check out RakNet.
I'm personally a big fan of this API and I would think that it'd fit your needs.
clb
clb
+1 for RakNet. There also exists libraries like eNet ( C ), and Lidgren (C#),which are geared for games. Also, I am the author of a library called kNet (C++), which is built for a similar purpose.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.