Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,493 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,708 people online right now. Registration is fast and FREE... Join Now!




How would I make two players connect to play a game - Networking?

 
Reply to this topicStart new topic

How would I make two players connect to play a game - Networking?

devilsson2010
27 Jan, 2008 - 01:58 AM
Post #1

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 43


My Contributions
Some of you may have played the online checkers game that comes with windows. Well I want to do something similar, and have two or more people connect to each other and then play a game. But can anyone tell me what I would use to accomplish this? I'd google it but it's hard to google something that you don't know have in words.
User is offlineProfile CardPM
+Quote Post

jpw1991
RE: How Would I Make Two Players Connect To Play A Game - Networking?
27 Jan, 2008 - 04:26 AM
Post #2

New D.I.C Head
*

Joined: 13 Aug, 2007
Posts: 33


My Contributions
I think you need to learn sockets. Sockets can be used for communication across networks and the internet. If you plan to do it under windows, you will need to learn Winsock, for Unix and Linux you need to learn plain Sockets. I don't know of any good Winsock tutorials so you will need to google it.

However, I can help you with Unix/Linux sockets. Read this tutorial.

An example winsock program I found on this site is here.

Good luck smile.gif
User is offlineProfile CardPM
+Quote Post

devilsson2010
RE: How Would I Make Two Players Connect To Play A Game - Networking?
27 Jan, 2008 - 12:48 PM
Post #3

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 43


My Contributions
Thanks, that help a lot. biggrin.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 07:50PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month