• Advertisement
Sign in to follow this  

How Hard is it to Network? (Multiplayer)

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

Hello. I've been honing my skills with SDL and game programming lately. I've created some decent beginners clones, including the infamous Pong, and have created some basic demos to try out more advanced concepts. Actually, I haven't been able to make up my mind as to what I want to work on as a new project, but I believe I've settled on a tile based top-down shoot-'em-up. Anyway, I was wondering just how difficult it is to create a networking application for multiplayer gameplay. I have a feeling that this would be too advanced for me, but I wanted to know just how difficult it would be and if there are any libraries out there to make it easier. I know that DirectX includes a system for networking, but I'd like to avoid using that. (Besides, I'm sure that's the more advanced approach anyway. :-P ) Thanks! Any info., help, or direction is appreciated. :-)

Share this post


Link to post
Share on other sites
Advertisement
Writing network code isn't hard. Doing a multiplayer turn based program is pretty easy. Doing a multiplayer real time game is a pain in the rear and a half.

If you are writing network code for windows, you can use Winsock which is about as basic as it gets.

Share this post


Link to post
Share on other sites
Ah, RakNet and ReplicaNet look very promising. :-D Thanks for the links. I'll be sure to check them out. The learning curve doesn't seem to be too steep. :-)

Thanks again!

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Writing network code isn't hard. Doing a multiplayer turn based program is pretty easy. Doing a multiplayer real time game is a pain in the rear and a half.

If you are writing network code for windows, you can use Winsock which is about as basic as it gets.

Do you recommend WinSock over the other Network APIs CodeTitan suggested?

Share this post


Link to post
Share on other sites
I'd only recommend rolling your own networking in Winsock over using an existing high level API if you have a good reason to justify it, or a burning desire to learn about networking internals. For example if you were writing an MMORPG from scratch and had unique requirements and performance concerns, there might be some justification for writing your own network layer.

For any standard network game which isn't intended to support 100s of players, there aren't many good reasons not to use an existing library when high quality, free to use APIs exist. Most of them have far more features, and implement them more efficiently, then you could manage unless you were a networking expert. Integrating networking with your game model is usually a difficult enough job without having the added complexity of adding and debugging your own low level networking library.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
Quote:
Original post by SiCrane
Writing network code isn't hard. Doing a multiplayer turn based program is pretty easy. Doing a multiplayer real time game is a pain in the rear and a half.

If you are writing network code for windows, you can use Winsock which is about as basic as it gets.

Do you recommend WinSock over the other Network APIs CodeTitan suggested?


I recommend trying several and then going with one that suits you. I personally find WinSock to be high enough level for most non-gaming purposes. If you want a robust networking API with protection against packet repeat attacks, encrypted packets and resumption of dropped connections, then WinSock wouldn't be my first stop. Or my second or third.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement