Hi, I've made a Tic-Tac-Toe game in C# and I want to play with a friend of mine over the net. I need to write a code that will enable one of us to host the game, so that the other will join it.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
Hosting a game between two players
Page 1 of 12 Replies - 1462 Views - Last Post: 15 July 2009 - 04:57 PM
Replies To: Hosting a game between two players
#2
Re: Hosting a game between two players
Posted 03 July 2009 - 07:42 AM
barig4, on 3 Jul, 2009 - 07:19 AM, said:
Hi, I've made a Tic-Tac-Toe game in C# and I want to play with a friend of mine over the net. I need to write a code that will enable one of us to host the game, so that the other will join it.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
You would basically want a type of client/server connection. The best thing I can think is this:
When the program starts you give the player the choice to host the game or join the game.
If the player hosts the game, you get the players IP address and set up a TCP/IP listener on the IP address.
The other player would have to know what the TCP/IP listener's properties are and would connect to that listner with a TCP/IP client.
Just an idea on what you can look at.
#3
Re: Hosting a game between two players
Posted 15 July 2009 - 04:57 PM
SixOfEleven, on 3 Jul, 2009 - 06:42 AM, said:
barig4, on 3 Jul, 2009 - 07:19 AM, said:
Hi, I've made a Tic-Tac-Toe game in C# and I want to play with a friend of mine over the net. I need to write a code that will enable one of us to host the game, so that the other will join it.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
You would basically want a type of client/server connection. The best thing I can think is this:
When the program starts you give the player the choice to host the game or join the game.
If the player hosts the game, you get the players IP address and set up a TCP/IP listener on the IP address.
The other player would have to know what the TCP/IP listener's properties are and would connect to that listner with a TCP/IP client.
Just an idea on what you can look at.
That's helpful though i need more basic information. After the connection will be made, how will the two
computers receive each others actions? (the button pressing with the mouse), I'm not sure what to look for here
and I'm a little confused.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|