Archived

This topic is now archived and is closed to further replies.

new to multiplayer progamming, some questions.

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

1.what should I use? DirectPlay or Winsock? what is more comfortable, and easy to use? 2.do I need to learn threads for making an multiplayer game? because I heard I need to create threads, if not it''s very slow... TIA.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1. Winsock is quite good. Maybe not the easiest but once you figure it out howto use it, there is no problems to use it.

2. Not necessary need threads. Peronally Ill use select based system and seems work well for my project.

Making online game is quite large project and could take years to complete if you do it alone, I know this one. Ofcource this depends genre of your game.

X

Share this post


Link to post
Share on other sites
I highly recommend winsock (raw).

Threading is an essential concept and programming tool. Learn it because it can be very beneficial later on.

Kuphryn

Share this post


Link to post
Share on other sites
I find that, after you learn to use threads (which is important), you try and use them everywhere.

Sometime later, you''ll start realizing that threads often cost more than they gain you, and you''ll learn to use threads only where necessary, which is even more important!

I''d recommend winsock and select(), which makes for an easy-to-port program with high performance and without threads.

Share this post


Link to post
Share on other sites
Raduprv:
I''m using DirectX, I dont want to use another library...

I decided I will use Winsock.
I did some research and I found there are 2 types, Asynchronous Sockets, and Non Blocking.
what should I use?

Share this post


Link to post
Share on other sites
Someone can correct me if I''m wrong, but blocking and asynchronous means that one call blocks whereas the other does a check and returns right away. Which one to use totally depends on your architecture.

DirectPlay is an overkill for most cases. Winsock is simple enough.

Threads are usually slower for most network-related applications. Select is usually faster and lets you avoid concurrency issues, which are always a pain.

Share this post


Link to post
Share on other sites